mawinkler / astroweather-card

Lovalace Card for the AstroWeather Integration
MIT License
23 stars 2 forks source link

Date format currently based on language #12

Open ingoratsdorf opened 1 year ago

ingoratsdorf commented 1 year ago

Great work and beautiful card. Thanks. Would it be possible to show dates in the selected HA format and not in the default lange format? I am in NZ and the language is EN but the date format we are using is more the European and not Americal with month first, ie 24/10 for 10 October, instead of the American 10/24. It's setup in the user profile as 24/10 but your JavaScript output in the card uses the standard language format, thus displays as 10/24.

mawinkler commented 1 year ago

You're right, I'm using toLocaleTimeString(lang,... whereby lang is the hass.language. I need to check for the configured unit/date format instead. This would make sense but requires some work do to it properly. I'm pretty short in time, so it will take some time.

The world should really agree on a unified system :grin:

ingoratsdorf commented 1 year ago

I'll see what I can do to help. I might look into it and send you a code snippet if I find some time and a reference. Yes, unified system would be lovely. But I guess even with international standards people still have their choices and preferences ;-)