diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-02-24 18:23:03 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 18:23:03 +0900 |
commit | 89c65c856e4d88cd455d6fb0352755b2dc0b1b66 (patch) | |
tree | a0ff2b2d694f3d54c9c11a8f62bdd5737509691f /src/lib/strings/time.ts | |
parent | c2d87b807554f11cb99694d4b0ccb86905d468c0 (diff) | |
parent | d38f168de593b0a7883180ee51bf043eb1557dd2 (diff) | |
download | voidsky-89c65c856e4d88cd455d6fb0352755b2dc0b1b66.tar.zst |
Merge branch 'bluesky-social:main' into patch-3
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 { |