Added current time to header

This commit is contained in:
Paweł Malak
2021-11-10 14:19:41 +01:00
parent 76e68db06f
commit ea57dbf750
10 changed files with 57 additions and 17 deletions

View 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();
};