Repository navigation
Option to show date in ISO format - #124
naoki-mizuno wants to merge 3 commits into
Conversation
Replace the boolean units_mdy config field with a DateFormat enum (MDY/DMY/ISO). StorageManager migrates legacy units_mdy on load. Assisted-by: Claude (Anthropic)
Date format is now an independent 3-state setting (MDY/DMY/ISO) instead of being derived from the temperature unit. Switching temperature units still seeds a sensible default (°F->MDY, °C->DMY), but the date format can be cycled independently and persists across boots. Repurpose the unused on_units_mdy handler into on_date_format (cycles on click). Assisted-by: Claude (Anthropic)
Add a DATE-FORMAT button next to the 12/24 toggle that cycles MDY -> DMY -> ISO and shows the active mode. Shrink the APPLY NOW button to make room. Wire the click handler in the event binder. Assisted-by: Claude (Anthropic)
|
Hi Naoki, Thank you for the PR. The ISO date format option is a good idea, and your implementation was very helpful as a reference. I reworked this on my side instead of merging the PR directly, mainly because this screen is generated from my EEZ project and I need to keep the generated UI files in sync with the source layout. I added a separate date format setting with MDY / DMY / ISO, kept migration from the old I also kept temperature units and date format independent after the initial/default choice, so switching °C/°F will not overwrite a manually selected date format. Regarding the German label: I shortened I tested the implementation locally and on the device. I really appreciate the idea and the detailed notes about the EEZ source file. |
|
Hi @naoki-mizuno, Thank you again for the ISO date-format proposal and implementation! I reworked the code to keep the generated EEZ UI files in sync and to preserve migration from the old setting, but your PR was an important reference for the final MDY / DMY / ISO date-format feature added in 343a78b. I’m now improving how Project Aura records community contributions. The project has an Individual Contributor License Agreement, and I’d appreciate it if you could read the current CLA. If you’re happy with it, please post the following exact text as a separate comment containing only this sentence:
Separately from the CLA, I’d like to record this PR properly and credit your contribution to the date-format design and implementation. Thank you again for helping make Aura work better for Japanese and ISO-format users! |
|
I have read and agree to the Project Aura Individual Contributor License Agreement v2.0, and I hereby sign it. |
|
Thank you for contributing to Project Aura. Before this pull request can be merged, I have read and agree to the Project Aura Individual Contributor License Agreement v2.0, and I hereby sign it. You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Summary
Following up on the Japanese language addition, I added the ability to show the dates in ISO format (YYYY-MM-DD). The option is added in the date/time settings page, next to the 12/24 button. Since the "apply now" button is now shorter, German "JETZT ANWENDEN" becomes two lines (other languages looked fine). Google Translate tells me it means "apply now" and I think this can simply be "anwenden," but I don’t speak German so I left it intact.
There is a migration logic for the
units_mdyboolean option, and keeps the sensible defaults for Fahrenheit → MM/DD/YYYY (for US) and Celsius → DD.MM.YYYY (EU).It seems the
.eez-projectfile was missing from the repo, so if you could either add that file to the repo, or update it on your end so that future changes will not revert this change, that would be great.As in the other PR, if you prefer to have the commits squashed into one please let me know.
Checklist