github / github/relative-time-element

Stray days added to duration

Offen
#262 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
4k
Forks
192
Ø Merge
1 T. 10 Std.
Gemergte PRs (30 T.)
5

Beschreibung

Hey, I am having an issue where the relative time between `2022-07-11T09:00:00+02:00` and `2023-07-11T09:00:00+02:00` is `1 year, 5 days` instead of `1 year`. Similarly `2023-05-11T09:00:00+02:00` and `2023-07-11T09:00:00+02:00` are `2 months, 1 day` where I'd expect it to be just `2 months`. As I shorten or lengthen the difference between datetimes the days decrease or increase respectively.

I can think of possibilities at calculation level where these come from, however I find the human-readable duration confusing.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.