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

[feature] Accept custom relative thresholds in duration.humanize #4296

Closed
wants to merge 2 commits into from

Conversation

TedDriggs
Copy link
Contributor

Fixes #4295

assert.equal(
moment.duration({seconds: 10}).humanize({thresholds: thresholds, withSuffix: true}),
'in a minute',
'100 seconds = a minute (with thresholds and suffix)'
Copy link

@TWiStErRob TWiStErRob Dec 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{seconds: 10} VS "100 seconds", one of these is wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the message has an extra zero. I'll put up a fix.

@TedDriggs TedDriggs changed the title Accept custom relative thresholds in duration.humanize [feature] Accept custom relative thresholds in duration.humanize Dec 5, 2017
@ichernev
Copy link
Contributor

Merged in 757d4ff

ichernev added a commit that referenced this pull request Apr 25, 2020
[feature] Accept custom relative thresholds in duration.humanize
@ichernev ichernev closed this Apr 25, 2020
@JaxonWright
Copy link

JaxonWright commented May 7, 2020

This allegedly is in 2.25, but I still don't seem to have it after upgrading to 2.25.3.

EDIT: It appears to be missing in the ts3.1-typings, which my Angular project is deciding to use for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Pass relativeTimeThresholds to humanize() as argument
5 participants