From b5c1662e0bc4ee6d19a01d8465d3fe139e2adb3f Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 25 十一月 2024 21:55:22 +0800
Subject: [PATCH] 装机设备需要医生手动输入,防止出错
---
src/utils/formatter.ts | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/utils/formatter.ts b/src/utils/formatter.ts
index 6931319..02bcb56 100644
--- a/src/utils/formatter.ts
+++ b/src/utils/formatter.ts
@@ -9,3 +9,8 @@
export function PrefixInteger(num, length) {
return (Array(length).join('0') + num).slice(-length);
}
+
+export function formatTimeslot(timeslot: number): string {
+ const strTimeslot = PrefixInteger( timeslot, 8 )
+ return strTimeslot.slice(0,2) + ":" + strTimeslot.slice(2,4) + ' ~ ' + strTimeslot.slice(4,6) + ":" + strTimeslot.slice(6,8)
+}
--
Gitblit v1.9.3