Skip to content

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

@GrahamBorland

Description

@GrahamBorland

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