Open JRebella opened 1 year ago
The base date-fns package lets you parse an incomplete date string using a format and a reference time. For example:
parse('15:00', 'HH:mm', new Date()); // Today at 15:00 in the local browser's timezone
What if I want to do the same but instead of using the local browser's timezone, I want to use a specific IANA timezone name like US/Central?
US/Central
Similar to day.js's tz parse: https://day.js.org/docs/en/timezone/parsing-in-zone
dayjs.tz("12-25-1995", "MM-DD-YYYY", "America/Toronto")
The base date-fns package lets you parse an incomplete date string using a format and a reference time. For example:
What if I want to do the same but instead of using the local browser's timezone, I want to use a specific IANA timezone name like
US/Central
?Similar to day.js's tz parse: https://day.js.org/docs/en/timezone/parsing-in-zone