-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
still maintained? #123
Comments
Yes, it's still maintained. I see the PR that's 6 months old but I'm not sure what problem it solves and what makes it critical, and why we would need to pull in another library for the formatting. |
Hi, thanks for the reply. Both open PRs #97 and #114 basically solve the same problem: it's not possible to use the format prop with duration or durationFromNow. Here are two examples: <Moment
date="2020-09-21T06:27:39-0500"
duration="2020-09-21T04:12:15-0500"
format="hh:mm:ss"
/>
// Outputs: 01:27:39
// Correct: 02:15:24
<Moment
date={new Date(Date.now() - (1000 * 60 * 60 * 2 /* 2h */) - (1000 * 60 * 15 /* 15m */) - (1000 * 24 /* 24s */))}
durationFromNow
format="hh:mm:ss"
/>
// Outputs: 01:21:07
// Correct: 02:15:24 There is not need to pull in new library to fix it as you are already using if (format && !fromNowPeriod && !duration && !durationFromNow) { which actually is what PR #97 and PR #114 both want to change. PR #114 additional provides access to the trim function of moment-duration-format, which could be useful for displaying things My vote would go to PR #114 if you should decide to pull one. |
Alright, I merged #114 and published to npm as v1.0.0. |
Perfect, thanks a lot! |
Is this library still maintained? There is at least one critical pull request to correctly handle duration formatting pending for over a year, without comment.
The text was updated successfully, but these errors were encountered: