mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-27 07:34:43 +02:00
👌 Code review : implemented the requested changes
This commit is contained in:
parent
96684f57c8
commit
74370ac557
@ -37,12 +37,10 @@ export default {
|
|||||||
return this.timeZone.split('/')[1].replaceAll('_', ' ');
|
return this.timeZone.split('/')[1].replaceAll('_', ' ');
|
||||||
},
|
},
|
||||||
showSeconds() {
|
showSeconds() {
|
||||||
if (this.options.hideSeconds) return !this.options.hideSeconds;
|
return !this.options.hideSeconds;
|
||||||
// this is the default
|
|
||||||
return true;
|
|
||||||
},
|
},
|
||||||
use12Hour() {
|
use12Hour() {
|
||||||
if (this.options.use12Hour) return this.options.use12Hour;
|
if (typeof this.options.use12Hour === "boolean") return this.options.use12Hour;
|
||||||
// this is the default, it gets computed by the DateTimeFormat implementation
|
// this is the default, it gets computed by the DateTimeFormat implementation
|
||||||
return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false;
|
return Intl.DateTimeFormat(this.timeFormat, { timeZone: this.timeZone, hour: 'numeric' }).resolvedOptions().hour12 ?? false;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user