From 81342e2579165ebfdb28c749dc5225141721a419 Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 13:11:48 -0600 Subject: switched to double quotes --- frontend/src/utils/Time.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'frontend/src/utils/Time.ts') diff --git a/frontend/src/utils/Time.ts b/frontend/src/utils/Time.ts index 34830b0..8f2c03c 100644 --- a/frontend/src/utils/Time.ts +++ b/frontend/src/utils/Time.ts @@ -6,47 +6,47 @@ export function time_ago(date: any) { let interval = Math.floor(seconds / 31536000); if (interval === 1) { - return interval + ' year ago'; + return interval + " year ago"; } if (interval > 1) { - return interval + ' years ago'; + return interval + " years ago"; } interval = Math.floor(seconds / 2592000); if (interval === 1) { - return interval + ' month ago'; + return interval + " month ago"; } if (interval > 1) { - return interval + ' months ago'; + return interval + " months ago"; } interval = Math.floor(seconds / 86400); if (interval === 1) { - return interval + ' day ago'; + return interval + " day ago"; } if (interval > 1) { - return interval + ' days ago'; + return interval + " days ago"; } interval = Math.floor(seconds / 3600); if (interval === 1) { - return interval + ' hour ago'; + return interval + " hour ago"; } if (interval > 1) { - return interval + ' hours ago'; + return interval + " hours ago"; } interval = Math.floor(seconds / 60); if (interval === 1) { - return interval + ' minute ago'; + return interval + " minute ago"; } if (interval > 1) { - return interval + ' minutes ago'; + return interval + " minutes ago"; } - if (seconds < 10) return 'just now'; + if (seconds < 10) return "just now"; - return Math.floor(seconds) + ' seconds ago'; + return Math.floor(seconds) + " seconds ago"; } export function ticks_to_time(ticks: number) { @@ -58,5 +58,5 @@ export function ticks_to_time(ticks: number) { seconds = seconds % 60; minutes = minutes % 60; - return `${hours === 0 ? '' : hours + ':'}${minutes === 0 ? '' : hours > 0 ? minutes.toString().padStart(2, '0') + ':' : minutes + ':'}${minutes > 0 ? seconds.toString().padStart(2, '0') : seconds}.${milliseconds.toString().padStart(3, '0')}`; + return `${hours === 0 ? "" : hours + ":"}${minutes === 0 ? "" : hours > 0 ? minutes.toString().padStart(2, "0") + ":" : minutes + ":"}${minutes > 0 ? seconds.toString().padStart(2, "0") : seconds}.${milliseconds.toString().padStart(3, "0")}`; } -- cgit v1.2.3