Summary: | KAB calculates wrong age | ||
---|---|---|---|
Product: | [Applications] kaddressbook | Reporter: | Michael Skiba <opensource> |
Component: | general | Assignee: | Allen Winter <winter> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nalvarez, qqqqqqqqq9, tokoe, winter |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdepimlibs/95c143d27decbf01f6807de9e1e1d588702b2acb | Version Fixed In: | 4.9.3 |
Sentry Crash Report: |
Description
Michael Skiba
2012-04-24 17:17:44 UTC
Hi, today on Octobre 1st 2012 kaddressbook report the following Birthday/age combinations: (Jahre = Years) 23. November 1795 (217 Jahre alt) vs 24. November 1795 (216 Jahre alt) 29. Oktober 1900 (112 Jahre alt) vs Dienstag, 30. Oktober 1900 (111 Jahre alt) Samstag, 22. November 1800 (212 Jahre alt) vs 23. November 1800 (211 Jahre alt) Possible Reason (Speculation by PovAddict ob #kontact) kaddressbook seems to be assuming there are 365 days in a year i. e. ignores leap days. e. g. (today - 1795/11/23) = 79205, which is an exact multiple of 365 or: (today - 1800/11/22) = 77380 days, which is an exact multiple of 365 Hi, i should add: Archlinux Packages; kontact 4.9.1 I see the problem in grantleecontactformatter.cpp: const int years = ( birthday.daysTo( QDate::currentDate() ) / 365 ); will replace that with the dateDiff function found in the sdsummarywidget Git commit 95c143d27decbf01f6807de9e1e1d588702b2acb by Allen Winter. Committed on 03/10/2012 at 22:52. Pushed by winterz into branch 'KDE/4.9'. fix age computation for birthday strings FIXED-IN: 4.9.3 M +11 -1 akonadi/contact/standardcontactformatter.cpp http://commits.kde.org/kdepimlibs/95c143d27decbf01f6807de9e1e1d588702b2acb Git commit 43bf2e8551d2a656722acfd0737fec241fbc2f77 by Allen Winter. Committed on 03/10/2012 at 23:20. Pushed by winterz into branch 'KDE/4.9'. fix birthday age computation here too M +11 -1 kaddressbook/grantleecontactformatter.cpp http://commits.kde.org/kdepim/43bf2e8551d2a656722acfd0737fec241fbc2f77 |