wassy92x / lovelace-digital-clock

A custom digital clock card for Home Assistant
MIT License
96 stars 17 forks source link

enable 24 hour time #22

Closed DERFAUSt closed 1 year ago

DERFAUSt commented 2 years ago

hello :).....

how do i enable 24 hour time?....

also....how do you use 'firstLineFormat'?.....what is the format?.....been messing with it...could you post a more complicated example?... i appreciate your time and effort :)

thank you :)

mtfurlan commented 2 years ago

time/dateFormat can be strings, and they accept moment formatting stuff

type: custom:digital-clock
timeFormat: HH:mm:ss
dateFormat: yyyy-MM-dd LLL ccc

I also found it confusing till I read the words carefully, I think changing the example would help a lot:

diff --git a/README.md b/README.md
index b4de0ab..50a3e48 100644
--- a/README.md
+++ b/README.md
@@ -33,9 +33,7 @@ dateFormat:
   weekday: 'long'
   day: '2-digit'
   month: 'short'
-timeFormat:
-  hour: '2-digit'
-  minute: '2-digit'
+timeFormat: HH:mm:ss