QDate range extended

Thiago Macieira thiago at kde.org
Wed Jun 14 09:48:28 BST 2006


David Jarvie wrote:
>On Wed Jun 14  8:13 , Thiago Macieira <thiago at kde.org> sent:
>>David Jarvie wrote:
>>>I've been changing the KDateTime code to cater for the extended range,
>>> but I have noticed that QDate doesn't flag dates
>>> despite the statement in the comments that -4712 is the minimum year
>>> value. I suspect that QDate may be capable of representing dates
>>> before that year (with negative Julian day numbers), but
>>> clarification is needed, and either the comment or the validation
>>> code in QDate needs to be changed.
>>
>>The exact minimum date is Nov 25th, -4713.
>
>I set the date to 5th September -4713, and QDate::isValid() returns
> true.

Ok, I can confirm that: it means the algorithm works correctly for dates 
beyond JD 0, which in turn means I need to check the value of the year 
I'm given.

Fixed. I'm going to update the qt-copy patch.

-- 
Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
  thiago.macieira (AT) trolltech.com     Trolltech ASA
    GPG: 0x6EF45358                   |  Sandakerveien 116,
    E067 918B B660 DBD1 105C          |  NO-0402
    966C 33F5 F005 6EF4 5358          |  Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060614/f1e6d7ae/attachment.sig>


More information about the kde-core-devel mailing list