Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Change to release license header. | Jason McDonald | 2011-02-16 | 1 | -13/+13 |
| | | | | Reviewed-by: Trust Me | ||||
* | Update copyright year to 2011. | Jason McDonald | 2011-01-11 | 1 | -1/+1 |
| | | | | | Reviewed-by: Trust Me (cherry picked from commit ac5c099cc3c5b8c7eec7a49fdeb8a21037230350) | ||||
* | Fix QDate::isLeapYear() for years < 1 | John Layt | 2010-03-30 | 1 | -8/+42 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current formula for isLeapYear() assumes that years -4, -8, etc are leap years in the Julian Calendar. This is not the case, leap years in fact fall in -1, -5, -9, etc as there is no year 0 in the Julian Calendar (count back 4 years from 4AD to confirm). The julianDayFromDate() and getDateFromJulianDay() functions correctly calculate this, but isValid() uses isLeapYear() and so causes setDate() to incorrectly reject valid dates. Sample test code to round-trip a jd to ymd and back to jd: QDate testDate; QDate loopDate = QDate::fromJulianDay(1); while ( loopDate.toJulianDay() <= 5373484 ) { // <= 9999-12-31 testDate.setDate( loopDate.year(), loopDate.month(), loopDate.day() ); if ( !testDate.isValid() || loopDate != testDate ) { qDebug() << "Round Trip failed : " << loopDate.toJulianDay() << " = " << loopDate.year() << loopDate.month() << loopDate.day() << " = " << testDate.toJulianDay(); } loopDate.addDays(1); } Before the fix, 29 Feb 1 BC (year = -1) and all other BC leap days returned by year() month() day() would result in setDate() failing. After the fix the round trip works fine. Merge-request: 2282 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com> | ||||
* | Update copyright year to 2010 | Jason McDonald | 2010-01-06 | 1 | -1/+1 |
| | | | | Reviewed-by: Trust Me | ||||
* | Update license headers again. | Jason McDonald | 2009-09-09 | 1 | -4/+4 |
| | | | | Reviewed-by: Trust Me | ||||
* | Update tech preview license header. | Jason McDonald | 2009-08-31 | 1 | -13/+13 |
| | | | | Reviewed-by: Trust Me | ||||
* | Update license headers. | Jason McDonald | 2009-08-11 | 1 | -1/+1 |
| | | | | Reviewed-by: Trust Me | ||||
* | Update license headers as requested by the marketing department. | Jason McDonald | 2009-06-16 | 1 | -2/+2 |
| | | | | Reviewed-by: Trust Me | ||||
* | Test for QDate::fromDate with string format. | Olivier Goffart | 2009-05-26 | 1 | -0/+26 |
| | | | | | Note that two digit years are always in the year 19xx This is excepted for compatibility reason as discussed with Peter | ||||
* | Remove obsolete code from autotests. | Jason McDonald | 2009-04-16 | 1 | -21/+0 |
| | | | | | | | | Each version of Qt has its own set of autotests, therefore preprocessor directives relating to obsolete QT_VERSION's are not necessary. Reviewed-by: Carlos Duclos | ||||
* | Long live Qt 4.5! | Lars Knoll | 2009-03-23 | 1 | -0/+909 |