Closed doolio closed 6 months ago
Can you share the relevant config so that I can test it?
Is it possible that it just rounded up (legitimately)?
memento-mori-age
returns a float which is rounded into 2 decimal places by format "%.2f"
in memento-mori-update
.
memento-mori-age
uses truncate
which always rounds down. But format
probably rounds toward nearest.
Sure.
(use-package memento-mori ; Reminder of one's mortality.
:demand t ; As I lazy load by default.
:init (setq memento-mori-birth-date "2022-12-21") ; Shows as 1.00 years old.
;;:init (setq memento-mori-birth-date "2023-12-19") ; Shows as 0.00 years old but should be > 0 (today being 2023-12-20), no?
:config (memento-mori-mode))
Is it possible that it just rounded up (legitimately)?
A whole 24hrs in advance?
Edit: Update comment.
Note: 365.2425
is the average length of a year, taking leap years into account.
These are slightly different questions to ask:
1) How old are you in average years? 2) How old are you according to the calendar?
A whole 24hrs in advance?
The time of day is truncated to 0, only the day is used. This may not be the right choice.
Didn't see your reply before posting.
memento-mori-age
usestruncate
which always rounds down. Butformat
probably rounds toward nearest. The time of day is truncated to 0, only the day is used.
And probably explains my observation.
I'm going to go ahead and close this. Please feel free to reopen if you still have a question.
The time of day is truncated to 0, only the day is used. This may not be the right choice.
if you still have a question.
Only whether you agree this is the right choice?
Tomorrow is my birthday but the age shown today matches what my age will be tomorrow.