Parsing in Zone
Parse date-time string in the given timezone and return a Day.js object instance.
This requires the
Timezone
plugin to work
dayjs.extend(utc)
dayjs.extend(timezone)
dayjs.tz("2013-11-18T11:55:20", "America/Toronto") // '2013-11-18T11:55:20-05:00'
If you know the format of an input string, you can use that to parse a date, the arguments are the same as String + Format.
This requires the
CustomParseFormat
plugin to work
dayjs.extend(customParseFormat)
dayjs.tz("12-25-1995", "MM-DD-YYYY", "America/Toronto")