Skip to content
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

add moment().intervalNow() for exact left time without timezone #745

Closed
wants to merge 1 commit into from
Closed

add moment().intervalNow() for exact left time without timezone #745

wants to merge 1 commit into from

Conversation

crucifyer
Copy link

moment("2013-04-27T05:48:29.000Z").intervalNow()
"3 days 15 hours 2 minutes 53 seconds"

moment("2013-04-27T05:48:29.000Z").intervalNow(1)
"in 3 days 15 hours 2 minutes 53 seconds"

need for exact left time without timezone

thank you.

@ichernev
Copy link
Contributor

This looks very similar to #463.

@crucifyer
Copy link
Author

yes, I want this.

duration.humanize({precision: 3})
or
duration.countdown();

10:00:03 to '10 hours 3 seconds left'
don't want '0 minutes'

@timrwood
Copy link
Member

This is a pretty sweet addition, but I think it will have the same issues as outlined in this comment when localizing the string concatenation.

Also, this seems like a better addition to the Duration.prototype than the Moment.prototype.

Edit: comment copied from #740

@ichernev
Copy link
Contributor

Ah, I forgot about plugins. This is a great candidate for one, because it can start off as an english only version with limited usage and then extend (if enough people want it / contribute to it) to multiple languages.

@timrwood
Copy link
Member

timrwood commented Jun 3, 2013

Closing this in favor of moving it to a plugin.

@timrwood timrwood closed this Jun 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants