diff options
author | Jan-Olof Eriksson <jan-olof.eriksson@iki.fi> | 2024-02-24 16:37:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 16:37:08 +0200 |
commit | 1f9562847512bb41cd8bb381b735a388be4db59b (patch) | |
tree | 2181860f0f4cde3b4e24b5d6045420cc86083d91 /src/lib/strings/time.ts | |
parent | 38fd4282f88ac020ee72d5a6324191ee80798450 (diff) | |
parent | d38f168de593b0a7883180ee51bf043eb1557dd2 (diff) | |
download | voidsky-1f9562847512bb41cd8bb381b735a388be4db59b.tar.zst |
Merge branch 'bluesky-social:main' into main
Diffstat (limited to 'src/lib/strings/time.ts')
-rw-r--r-- | src/lib/strings/time.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/strings/time.ts b/src/lib/strings/time.ts index 05a60e94b..3e162af1a 100644 --- a/src/lib/strings/time.ts +++ b/src/lib/strings/time.ts @@ -23,7 +23,7 @@ export function ago(date: number | string | Date): string { } else if (diffSeconds < DAY) { return `${Math.floor(diffSeconds / HOUR)}h` } else if (diffSeconds < MONTH) { - return `${Math.floor(diffSeconds / DAY)}d` + return `${Math.round(diffSeconds / DAY)}d` } else if (diffSeconds < YEAR) { return `${Math.floor(diffSeconds / MONTH)}mo` } else { |