simplify age calculation #90

Closed
opened 2022-08-28 13:07:09 +00:00 by toast · 2 comments
Owner

Currently we import the s-age package - which does nothing but calculate the age difference.
What's worse, it apparently does it wrong (rounding "normally" rather than down).
Replace it with a function of our own.

Currently we import the `s-age` package - which does nothing but calculate the age difference. What's worse, it apparently does it wrong (rounding "normally" rather than down). Replace it with a function of our own.
toast self-assigned this 2022-08-28 13:07:09 +00:00
toast added this to the (deleted) project 2022-08-28 13:07:10 +00:00
Owner

From what I can tell, this library isn't even used so it could just be removed now.

From what I can tell, this library isn't even used so it could just be removed now.
Owner

The real problem is that the time.vue component uses Math.round() in the age calculation, when it should be using Math.floor() instead.

Johann and I were discussing in IRC earlier about that, and it might mean we'll need to make a separate component for birthdays since we'd otherwise have to special case a lot just for this use case.

The real problem is that the `time.vue` component uses `Math.round()` in the age calculation, when it should be using `Math.floor()` instead. Johann and I were discussing in IRC earlier about that, and it might mean we'll need to make a separate component for birthdays since we'd otherwise have to special case a lot just for this use case.
norm referenced this issue from a commit 2022-08-28 15:35:27 +00:00
Johann150 added the
upkeep
label 2022-12-23 10:24:54 +00:00
Sign in to join this conversation.
No labels
feature
fix
upkeep
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: FoundKeyGang/FoundKey#90
No description provided.