[Korganizer-devel] [Bug 227666] wrong age calculation for birth year 1961 in 2010, 2011 and 2012

Bernd Paysan bernd.paysan at gmx.de
Sat May 15 00:49:57 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=227666


Bernd Paysan <bernd.paysan at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bernd.paysan at gmx.de




--- Comment #16 from Bernd Paysan <bernd paysan gmx de>  2010-05-15 00:49:55 ---
Oh no, what a mess!  The calendar year's length is 365.2425 since 1582.  The
rounding method is chosen wrongly (I'd suggest round to nearest by adding 0.5),
affecting everybody in my list of birthdays.  Worst of all, this is even using
QDate, which has a year function.  Just use

end.year()-start.year()

for printing out the years for birthday and anniversary, and be done!  No need
for helper function for something that trivial, and even then possibly to mess
it up.

QDate has its own problems, by (wrongly) stating that there is "no year 0". 
Yes, there is, and it's there for 10 years now, it is all very handy for
computer-related date calculation.  Read up the ISO 8601 standard about date
and time representations, or at lest http://de.wikipedia.org/wiki/ISO_8601.

And please have someone with checking rights to KDE take this bug, it can't be
more than a five minutes fix.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Korganizer-devel mailing list