You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the format method page has more documentation for FormatOptions than the FormatOptions page, and is inconsistently documented (is it a boolean or a string that only allows the value 'UTC'?). If only UTC is allowed, the option should be called utc, and not timeZone. The FormatOptions page needs to be updated as well.
The format method should include the defined Unicode LDML options to output the timezone as part of the string.
This, in combination with allowing timeZone to be set to different timezone values, would allow a date to be expressed for any timezone. Strings such as 2024-10-04T21:05:59.878Z and 2024-01-01T11:59:59.456-06:00 could then be produced.
You can get the timezone to display using something like this (taken from this @epdoc/timeutil module):
Even if you don't allow FormatOptions.timeZone to have other values, it would still be useful to be able to format the timezone so that ISO date strings using local time can be output.
The naming of FormatOptions timeZone is inconsistent with nodejs getTimezoneOffset. I would suggest timezone be used (all lower case)
The text was updated successfully, but these errors were encountered:
timeZone
, and not justUTC
.I would allow all values that env.TZ can be set to.
Note that the
format
method page has more documentation forFormatOptions
than theFormatOptions
page, and is inconsistently documented (is it aboolean
or astring
that only allows the value 'UTC'?). If only UTC is allowed, the option should be calledutc
, and nottimeZone
. The FormatOptions page needs to be updated as well.format
method should include the defined Unicode LDML options to output the timezone as part of the string.This, in combination with allowing timeZone to be set to different timezone values, would allow a date to be expressed for any timezone. Strings such as 2024-10-04T21:05:59.878Z and 2024-01-01T11:59:59.456-06:00 could then be produced.
You can get the timezone to display using something like this (taken from this @epdoc/timeutil module):
Even if you don't allow FormatOptions.timeZone to have other values, it would still be useful to be able to format the timezone so that ISO date strings using local time can be output.
The naming of FormatOptions timeZone is inconsistent with nodejs getTimezoneOffset. I would suggest timezone be used (all lower case)
The text was updated successfully, but these errors were encountered: