Allow users to select time format for UI rendering#9042
Allow users to select time format for UI rendering#9042bramkragten merged 16 commits intohome-assistant:devfrom
Conversation
| const twoLine = value.slice(value.length - 2) !== "89"; // Display explicit number formats on one line | ||
| return html` | ||
| <paper-item .format=${format}> | ||
| <paper-item .format=${format} .label=${value}> |
There was a problem hiding this comment.
Without it, the label was both the format name and the example value combined => once you selected a short format such as "None", the selected dropdown item actually also showed the formatted number example as well. Now only the format name itself is the label.
That is really interesting. Google and MS style guides state to use AM and PM (as does Apple in their data picker) whereas many journalistic style guides say "a.m." and "p.m." (but they apply to written text, not to software, so I regard Google, MS, etc. higher here).
Number format: There we can easily override, but for time format we do need the original language, e.g. for Also just noted: Not sure if our current logic with |
|
We should check if we still need fecha, what browsers don't support |
According to MDN all browsers support |
|
We should check what happens on iOS 9, if you get an error, or just a not so nicely formatted date. If the latter, we can drop it. |
Given that I do not own any iOS devices, someone else needs to execute that check :) . |
|
iOS 9 is already almost dead, is it? |
Yes, it is, but a lot of users use an old tablet I think as a dashboard. Not something we should care about too much, that's why I asked if it broke it completely or just didn't look so nice 😃 |

Breaking change
Proposed change
Allow users to select the time format used by the frontend for rendering. Works quite similar to the newly introduced number formatting.
Possible selection:
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: