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 check for 12 months to formatDistanceStrict #2391

Merged
merged 1 commit into from Apr 8, 2021
Merged

Conversation

tan75
Copy link
Contributor

@tan75 tan75 commented Apr 1, 2021

Changes

This PR will allow formatDistanceStrict and formatDistanceToNowStrict to return '1 year' rather than '12 months' if
dstNormalizedMinutes < MINUTES_IN_YEAR && months === 12

Copy link
Member

@kossnocorp kossnocorp left a comment

Choose a reason for hiding this comment

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

👍

@kossnocorp kossnocorp merged commit 988b6ef into master Apr 8, 2021
@kossnocorp kossnocorp deleted the 2388-patch branch April 8, 2021 03:37
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.

formatDistanceStrict/formatDistanceToNowStrict returns '12 months' rather than '1 year'
2 participants