mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-08 05:23:11 +08:00
Added current time to header
This commit is contained in:
@@ -8,3 +8,4 @@ export * from './templateObjects';
|
||||
export * from './inputHandler';
|
||||
export * from './storeUIConfig';
|
||||
export * from './validators';
|
||||
export * from './parseTime';
|
||||
|
||||
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();
|
||||
};
|
||||
@@ -27,4 +27,5 @@ export const configTemplate: Config = {
|
||||
daySchema: 'Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday',
|
||||
monthSchema:
|
||||
'January;February;March;April;May;June;July;August;September;October;November;December',
|
||||
showTime: false,
|
||||
};
|
||||
|
||||
@@ -19,6 +19,7 @@ export const otherSettingsTemplate: OtherSettingsForm = {
|
||||
daySchema: 'Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday',
|
||||
monthSchema:
|
||||
'January;February;March;April;May;June;July;August;September;October;November;December',
|
||||
showTime: false,
|
||||
};
|
||||
|
||||
export const weatherSettingsTemplate: WeatherForm = {
|
||||
|
||||
Reference in New Issue
Block a user