Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004094 [Resin] minor always 06-30-10 07:19 01-17-11 14:05
Reporter nam View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 4.0.7
Summary 0004094: com.caucho.util.QDate.setMonth() sets wrong month
Description Currently, QDate recalculates the _dayOfMonth after a setMonth() call. But if the old _dayOfMonth exceeds the number of days in the new _month, then _month is automatically incremented to become the intended month + 1.

Steps:
1. create a new QDate for 2010-12-31
2. qDate.setMonth(1) // February
3. qDate.getMonth() // returns March

Workaround:
Call setMonth(11), then setDayOfMonth(), and finally setMonth(). However, it's natural to assume that order of the setter calls shouldn't affect the outcome (as evidenced in Resin's own use of QDate).

Additional Information
Attached Files

- Relationships

- Notes
(0004946)
ferg
01-17-11 14:05

server/1472
 

- Issue History
Date Modified Username Field Change
06-30-10 07:19 nam New Issue
06-30-10 07:30 nam Description Updated
01-17-11 14:05 ferg Note Added: 0004946
01-17-11 14:05 ferg Assigned To  => ferg
01-17-11 14:05 ferg Status new => closed
01-17-11 14:05 ferg Resolution open => fixed
01-17-11 14:05 ferg Fixed in Version  => 4.0.15


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker