04-05-2022 21:24
04-05-2022 21:24
Are any date formatting features available in the SDK JavaScript?
EG.
date.toLocaleString('fr-FR', options)
or are there routines to emulate this ?
Author | ch, passion for improvement.
Answered! Go to the Best Answer.
04-07-2022 04:06
04-07-2022 04:06
Unfortunately that's not available on device due to the version of ECMAScript supported by the Javascript engine.
You can see an example of localising dates here, albeit manually. https://github.com/Fitbit/sdk-i18n/tree/master/app
04-07-2022 04:06
04-07-2022 04:06
Unfortunately that's not available on device due to the version of ECMAScript supported by the Javascript engine.
You can see an example of localising dates here, albeit manually. https://github.com/Fitbit/sdk-i18n/tree/master/app
04-07-2022
04:22
- last edited on
07-02-2024
13:03
by
MarreFitbit
04-07-2022
04:22
- last edited on
07-02-2024
13:03
by
MarreFitbit
@JonFitbit- thanks, that is useful, however just noticed the setting below returns a language of "en-us".
Is this correct because it will return the wrong date format?
How do you get "en-gb"?
This may be why some English people complain about date format localization because there appears to be no English (UK) setting?
Author | ch, passion for improvement.
04-09-2022 02:28
04-09-2022 02:28
@JonFitbit - only some language examples are shown in the i18n - is there a complete set of files for all languages?
Author | ch, passion for improvement.
04-13-2022 07:31
04-13-2022 07:31
All English language options force the watch the show the date in MM/DD format. Only other languages change it to DD/MM. Will there be a way have the watch in English with DD/MM?
06-28-2022 16:50
06-28-2022 16:50
On the watch face I created, I added a Select within the companion App to allow the user to switch between MM/DD and DD/MM. I capture the selection and the watch to react to the changes.
06-29-2022 06:21
06-29-2022 06:21
On my watch faces I build the date display manually as a string concatenated from the individual time/date segments. I know this forces my choice on the user, but I consider it in keeping with the "Convention over Customization" paradigm I learned via Ruby on Rails. Besides, "YYYY-MM-DD" is the only "correct" universal format! 🙂