kenhy / datejs

Automatically exported from code.google.com/p/datejs
Other
0 stars 0 forks source link

Date.getTimezoneAbbreviation is wrong #186

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

    > node
    require('datejs')
    Date.getTimezoneAbbreviation( '+0000' )
    'GMT'

This should be UTC

Also, this part of the documentation:

    var today = Date.today();
    Date.getTimezoneAbbreviation(today.getTimezoneOffset, today.isDayLightSavingsTime()); // "UTC", "GMT", "EST", "PDT", etc.

Is entirely wrong. getTimezoneOffset is not called as a function, and 
isDayLightSavingsTime is spelled wrong, it's not a capital D and it's "Saving" 
not "Savings". Also calling this:

    var today = Date.today();
    Date.getTimezoneAbbreviation( today.getTimezoneOffset(), today.isDaylightSavingTime() );

Returns "null"

Original issue reported on code.google.com by delvarwo...@gmail.com on 28 May 2014 at 7:27