age in address book wrong calculated (month calculation off by one)
Categories
(Thunderbird :: Address Book, defect)
Tracking
(thunderbird_esr6870+ fixed, thunderbird71 fixed, thunderbird72 fixed)
People
(Reporter: unimportant.stuff, Assigned: darktrojan)
Details
Attachments
(1 file, 1 obsolete file)
1.65 KB,
patch
|
jorgk-bmo
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
Thunderbird 68.2.0 (32-Bit) german.
Open Addressbuch. Search contact. Open contact with double-click. Klick Privat in order to enter the birthday.
Entered birthday Oktober 28 1969.
Actual results:
The age (Alter) is shown 49 instead of 50.
Same issue happens e.g. for Oktober 1.
Expected results:
Today is October 30 2019. So it should be 50 years since two days.
Reporter | ||
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Confirmed. If you add the current date, you get age -1, that's not pretty either.
Geoff, you changed that code recently.
Assignee | ||
Comment 2•5 years ago
|
||
Failed to take into account that in javascript the months are numbered 0-11. :-/
Assignee | ||
Comment 3•5 years ago
|
||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Comment on attachment 9106116 [details] [diff] [review] 1592536-age-calculation-1.diff In case you wonder: I had my meeting with Magnus and we decided that he focus on some more important reviews. This works better now, but there's still a glitch: Enter Nov 4, 1969 as birthday. Close the card, then open it again, you get 50 y/o. Correct. Now change the year to 1970, 1971 and back down to 1968, etc. The age is adjusted accordingly. Correct. Now with Nov 4, 1969 and 50 y/o, reduce the age to 49. Date is not adjusted. Reduce to 48, now it's adjusted, but it's off by one.
Assignee | ||
Comment 5•5 years ago
|
||
Same problem. Same solution.
Comment 6•5 years ago
|
||
Comment on attachment 9106348 [details] [diff] [review] 1592536-age-calculation-2.diff Thanks, I wasn't expecting any novel solution, just a complete one ;-) I'll leave it for you to land in about six hours, I have a patch for now. Or I'll land it in 12 hours myself.
Updated•5 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/7cd9756e2aa1
Fix contact age calculation in address book. r=jorgk
Comment 8•5 years ago
|
||
TB 68.2.2 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/7007d1313240fef4059d4effa0b2525a928ffc84
Comment 9•5 years ago
|
||
TB 71 beta 3:
https://hg.mozilla.org/releases/comm-beta/rev/48cd321f476533f865ecfccca545056e6b7f410c
Updated•5 years ago
|
Description
•