Time zone offsets for any time zone, possible change to Date functionality (i18n)

Nebojša Ćirić cira at google.com
Tue Apr 9 14:46:45 PDT 2013


Wrote a short strawman -
http://wiki.ecmascript.org/doku.php?id=globalization:timezoneoffsets


2013/4/9 Nebojša Ćirić <cira at google.com>

> Sounds about right. We just need to agree it's worth doing it, and in
> which version of ES and i18n we wanna do it. If we keep tz parameter
> optional, we would avoid additional data burden on lite JS implementations.
>
>
> 2013/4/9 Domenic Denicola <domenic at domenicdenicola.com>
>
>> From: Nebojša Ćirić [cira at google.com]
>>
>> > That's correct. We may need reverse too - for given UTC epoch
>> milliseconds (or minutes after UTC Date) tell me what the date components
>> would be in a given timezone.
>>
>> Hmm, so:
>>
>> ```js
>> var date = new Date(utcMilliseconds);
>>
>> var monthInNewYork = date.getMonth("America/New_York");
>> var monthInParis = date.getMonth("Europe/Paris");
>> ```
>>
>> ? And I guess then `date.getUTCMonth()` is just an alias for
>> `date.getMonth("Etc./UTC")`. Seems good!!
>>
>>
>
>
> --
> Nebojša Ćirić
>



-- 
Nebojša Ćirić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130409/42bfe35b/attachment.html>


More information about the es-discuss mailing list