Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
en-ca is one of the only locales that follows ISO format, so keep it hardcoded for the whole world.
We can add the timeZone as a param though.
Then, use this function to get date and time in ISO format:
const toDateStringAndHHmmss = function (date: Date | undefined): [string, string] {
if (!date) {
return ['',''];
}
return new Intl.DateTimeFormat(timeFormatLocale, intlDateFormatOptions).format(date).split(' ') as [string, string];
};
en-ca is one of the only locales that follows ISO format, so keep it hardcoded for the whole world. We can add the timeZone as a param though. Then, use this function to get date and time in ISO format: