Summary: | Error in Date.setMonth() | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | rgunnyon | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | ap | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
rgunnyon
2012-07-31 12:10:40 PDT
I cannot reproduce this. Could you please attach a complete HTML test case that can be opened to easily see a pass/fail result? Created attachment 155865 [details]
Demonstrates the failure in setMonth()
This bug appears if you set the month to an even value when the current date is the 31st day of a month.
A second call sets the correct value.
I poked at it a bit more, this appears to be a 'gotcha' with date normalization. From the 31st, setting the month to one that doesn't have a 31st day triggers the shift to 1st, 2nd or 3rd of the next month. The second call to setmonth sets it to the 1st, 2nd or 3rd of the correct month. |