to calculate. The result is 24 Jahre (instead of 23 Jahre).
In order to verify, I put
`= (date(today) - this.birthday)`
which results in 24 years (instead of 23 years, and something).
Clearly a bug, I feel. Does this calculation "round" somehow? And if yes, can that be turned off to get exact results?
I have another table that shall show "upcoming birthdays in the next 2 months", with 3 columns File, Birthday, and Turns. This also shows that she’ll be turning 25 instead of 24.
Here’s the code:
so I assume dataview really returns a "bad" (or rounded?) calculation result!
I’m (wildly) assuming you’re using some “forum-like-date-display” code here, where it might be okay to say “someone commented roughly 24 years ago” but I would prefer exact results when working with a database-like system. Otherwise we won’t get good and exact birthday-type calculations, right? 😉
I’m showing "current age in years" in my people notes, but the calculation result is wrong: It shows a wrong age.
Today is 2021-05-04, and the person’s birthday is 1997-05-17, so she is clearly 23 years of age and about to turn 24 on May 17.
I have in the front matter:
and I use
to calculate. The result is 24 Jahre (instead of 23 Jahre).
In order to verify, I put
which results in 24 years (instead of 23 years, and something).
Clearly a bug, I feel. Does this calculation "round" somehow? And if yes, can that be turned off to get exact results?
I have another table that shall show "upcoming birthdays in the next 2 months", with 3 columns File, Birthday, and Turns. This also shows that she’ll be turning 25 instead of 24.
Here’s the code:
so I assume dataview really returns a "bad" (or rounded?) calculation result!
I’m (wildly) assuming you’re using some “forum-like-date-display” code here, where it might be okay to say “someone commented roughly 24 years ago” but I would prefer exact results when working with a database-like system. Otherwise we won’t get good and exact birthday-type calculations, right?😉
Hint: If using moment.js, relative time thresholds can be customized: https://momentjs.com/docs/#/customization/relative-time-threshold/
The text was updated successfully, but these errors were encountered: