Add error validation

This commit is contained in:
Alex Holliday committed 2024-10-04 11:40:01 +08:00
1 parent 6ac19000f7
commit 5f96b17595
5 files changed
+178 -70

No files matched your search

+5
View File
@@ -4,6 +4,11 @@ import timezone from "dayjs/plugin/timezone";
dayjs.extend(utc);
dayjs.extend(timezone);
export const MS_PER_SECOND = 1000;
export const MS_PER_MINUTE = 60 * MS_PER_SECOND;
export const MS_PER_HOUR = 60 * MS_PER_MINUTE;
export const MS_PER_DAY = 24 * MS_PER_HOUR;
export const formatDuration = (ms) => {
const seconds = Math.floor(ms / 1000);
const minutes = Math.floor(seconds / 60);