{"version":3,"sources":["../src/tzDate.ts"],"sourcesContent":["import { offset } from \"./offset\"\nimport { applyOffset } from \"./applyOffset\"\nimport { date } from \"./date\"\nimport { DateInput, MaybeDateInput } from \"./types\"\n\n/**\n * Creates a date object for the input date at the given timezone. For example\n * `tzDate(\"2017-05-06T12:00\", \"Europe/Amsterdam\")` will return a date object\n * for 2017-05-06T10:00:00Z since 12:00 in Amsterdam is 10:00Z.\n *\n * If given a Date object it will use local time and convert it to the given\n * timezone, thus \"changing\" the date.\n *\n * if given no string or date object, it'll use the current locale time and convert to the given timezone\n * @param [inputDate] - An iso8601 date string with no timezone\n * @param tz - A timezone string\n */\nexport function tzDate(inputDate: MaybeDateInput, tz: string) {\n  const d = date(inputDate)\n  return applyOffset(d, offset(d, tz))\n}\n"],"mappings":";AAAA,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AAed,SAAS,OAAO,WAA2B,IAAY;AAC5D,QAAM,IAAI,KAAK,SAAS;AACxB,SAAO,YAAY,GAAG,OAAO,GAAG,EAAE,CAAC;AACrC;","names":[]}