Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@GrahamBorland

Description

@GrahamBorland
Issue body actions

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.