captbaritone / captbaritone/datejs

Date.getTimezoneAbbreviation is wrong

Open
#186 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```

> 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.