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

DateHelper.fromNow() returns 11 months instead of 10 for 319 days #528

Open
GrahamBorland opened this issue Feb 8, 2023 · 0 comments
Open

Comments

@GrahamBorland
Copy link

The Moment.fromNow() spec says

45 to 319 days | MM | 2 months ago ... 10 months ago

implying that a timespan of 319 days should return "10 months ago".

The implementation in DateHelper returns "11 months ago" for this.

https://github.com/bennadel/JavaScript-Demos/blob/master/demos/date-helper-angular11/src/app/date-helper.ts#L271

I was curious if this was a known deviation from the spec?

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

No branches or pull requests

1 participant