Closed
Bug 379104
Opened 18 years ago
Closed 18 years ago
new Date(2007,5,0) should reflect May 31, 2007, not June 1, 2007
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
RESOLVED
FIXED
1.6R6
People
(Reporter: jag+mozilla, Unassigned)
Details
Attachments
(2 files)
2.52 KB,
patch
|
Details | Diff | Splinter Review | |
3.30 KB,
patch
|
szegedia
:
review+
|
Details | Diff | Splinter Review |
There's a small bug in NativeData.java in how the Date constructor and the UTC function handle the value for the day-of-month component. Currently both map anything less than 1 to 1. According to ECMA-262 (3rd), section 15.9.1.12 step 8, the value should simply be added as-is.
See also bug 9523 and change 3.19 to jsdate.c
Note that bug 9523 didn't update the date_UTC(...) function, I'll file a bug on that shortly.
The Date constructor bug was found and fixed by Ilya Frank <ifrank@danger.com>, a colleague of mine at Danger Inc. Based on that I discovered and fixed the UTC function version of the bug.
Reporter | ||
Comment 1•18 years ago
|
||
See bug 363578 for fixing the UTC function in jsdate.c.
Reporter | ||
Comment 2•18 years ago
|
||
Reporter | ||
Updated•18 years ago
|
Attachment #263106 -
Flags: review?(szegedia)
Comment 3•18 years ago
|
||
Comment on attachment 263106 [details] [diff] [review]
Same, but with most of the shared code factored out
Looks okay. Also a nice refactoring to eliminate some code duplication.
Attachment #263106 -
Flags: review?(szegedia) → review+
Comment 4•18 years ago
|
||
Committed the patch to CVS.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•18 years ago
|
||
Cool! Thanks for checking this in. Is there a test we can/should update?
Comment 6•18 years ago
|
||
Adding target milestone of 1.6R6 based on the date this bug was resolved FIXED.
Target Milestone: --- → 1.6R6
You need to log in
before you can comment on or make changes to this bug.
Description
•