9
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 10 Sep 2025
9 points (100.0% liked)
JavaScript
2786 readers
1 users here now
founded 3 years ago
MODERATORS
Probably due to it being a rare use-case. Sounds like you need durations, which are usually expressed as the timeframe between two dates. Perhaps the
intervalToDurationfunction of the date-fns lib could help with this though. There's alsoformatDurationwhich may be helpful.I ended up figuring it out by using this simple pseudocode.