Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

getDate, getUTCDate: wrong result #13538

Closed
craff opened this issue Aug 30, 2015 · 1 comment
Closed

getDate, getUTCDate: wrong result #13538

craff opened this issue Aug 30, 2015 · 1 comment

Comments

@craff
Copy link

craff commented Aug 30, 2015

The method getDate and getUTCDate give result in 0-30 range while, accoding to spec it should be 1-31 (I agree taht getDate in 1-31 and getMonth in 0-11 is not coherent, but this is what the specs are saying).

More importantly, getDate can give result outside the month range (and together with getMonth, we can have a date like 32nd august !!!)

@zackw
Copy link
Collaborator

zackw commented Oct 14, 2015

phantomjs> new Date('2000-01-31').getDate()
31

If you are using PhantomJS 1.9.x, please update to 2.0, it contains a much newer Webkit that may have resolved the problem. If you still experience the problem with 2.0 please reopen this issue and provide a complete JavaScript program that demonstrates the problem.

@zackw zackw closed this as completed Oct 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants