captbaritone / captbaritone/datejs

Date.parse creating wrong day in month

Open
#71 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

```
What steps will reproduce the problem?
1. Example date: "Mon Apr 20 20:05:30 +0000 2009"
2. var d = Date.parse(time);
// also, capital S does not produce the ordinal...
3. d.toString("h:mm tt MMM d") + d.getOrdinal();

What is the expected output?
8:42 AM Apr 20rd

What do you see instead?
7:42 AM Apr 23rd

What version of the product are you using? On what operating system?
latest version as of 4/20 on osx and win vista

The date above is one of 3, the first 2 work correctly (e.g. "Wed Apr 22
14:13:57 +0000 2009", "Tue Apr 21 17:29:36 +0000 2009"). Additionally,
these dates are part of the JSON from a twitter -
http://twitter.com/statuses/user_timeline.json

```

Original issue reported on code.google.com by `rob.koberg` on 23 Apr 2009 at 11:47

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.