mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-10 14:33:11 +08:00
Added current time to header
This commit is contained in:
11
client/src/utility/parseTime.ts
Normal file
11
client/src/utility/parseTime.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const parseTime = (time: number, ms = false) => {
|
||||
if (ms) {
|
||||
if (time >= 10 && time < 100) {
|
||||
return `0${time}`;
|
||||
} else if (time < 10) {
|
||||
return `00${time}`;
|
||||
}
|
||||
}
|
||||
|
||||
return time < 10 ? `0${time}` : time.toString();
|
||||
};
|
||||
Reference in New Issue
Block a user