Skip to content

timeAgo() should test smaller durations first #283

@JetForMe

Description

@JetForMe

The implementation of timeAgo() first checks years, then months, then days, etc. This results in a situation where times jump from a few minutes ago to a full day ago. For example, say it's currently 00:25, and you're looking at a time 24 minutes ago. You get, as you would expect, "24 minutes ago". But if you look at a time 26 minutes ago, you get "1 day ago," which is arguably not what you want.

Instead, you want seconds ago to grow to minutes ago to grow to hours ago to grow to days ago, etc.

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