datef
datef copied to clipboard
Example timezone option in README
How can the timezone be set to UTC when generating the date/time?
I see the option in the README but am struggling to understand how it can be set.
Can we include an example of setting the timezone in the doc?
Unfortunately, you can't set timezone in JS. The only solution is to shift date to the difference between current TZ and desired TZ, convert it to ISO8601 string with desired TZ in proper position and then use Date.parse
to create new instance of Date.
datef doesn't have capability to change dates, it only renders them.
As for example, this repo is not currently upstream and is not actually maintained, this one is: https://github.com/maxvipon/datef