Today is 1st of July. In a month time, it will be 1st of August.
I fell back to searching for other libs when I saw that date-fns was making the same mistake. I might be missing something, but this does not seem like a human readable date duration given it does not match natural language! I can take a look at the code but I'm looking first to understand if this is expected behavior.
humanizeDuration(new Date(2021, 8, 1, 12).getTime()-new Date().getTime()
// returns: 2 months, 1 day, 6 hours, 3 minutes, 48.313 secondsToday is 1st of July. In a month time, it will be 1st of August.
I fell back to searching for other libs when I saw that
date-fns
was making the same mistake. I might be missing something, but this does not seem like a human readable date duration given it does not match natural language! I can take a look at the code but I'm looking first to understand if this is expected behavior.