wassy92x / lovelace-digital-clock

A custom digital clock card for Home Assistant
MIT License
89 stars 13 forks source link

24 Hour #35

Closed jjanderson closed 6 months ago

jjanderson commented 8 months ago

Hello,

Is there a way to stipulate 24 hour clock format?

i.e 14:30 as opposed to 02:30?

Many thanks

yatush commented 8 months ago

You can add:

cards:
    - type: custom:digital-clock
      firstLineFormat: 'H:MM'

For this.

IoT-CI-Ltd commented 8 months ago

Hi,

That does not work. With H or HH

image

yatush commented 8 months ago

This worked for me.

cards:

On Mon, Nov 6, 2023, 5:24 PM IoT-CI-Ltd @.***> wrote:

Hi,

That does not work

[image: image] https://user-images.githubusercontent.com/149575798/280759393-de043bb0-e5a4-47a5-baef-61f6bb93f4e8.png

— Reply to this email directly, view it on GitHub https://github.com/wassy92x/lovelace-digital-clock/issues/35#issuecomment-1795086206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQI6GTPFAKLTMFCH3EROB3TYDD6KTAVCNFSM6AAAAAA6VUEWF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJVGA4DMMRQGY . You are receiving this because you commented.Message ID: @.***>

IoT-CI-Ltd commented 8 months ago

Found the issue, and all sorted now, thanks for your help

FelixPopp commented 7 months ago

firstLineFormat: HH:MM did not work for me. It showed the month instead of minutes. With firstLineFormat: HH:mm it works correct for me.

https://moment.github.io/luxon/#/formatting?id=toformat