Is toLocaleString() supported? I got the current locale from user-settings with locale.language and I tried to localise the date with toLocaleString(), but it didn't work.
How is the date localised in the Fitbit-watchfaces?
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Sorry, the device only support ES 5.1 JavaScript, and toLocaleDateString() doesn't support the formatting options in this version.
Best AnswerI was wondering the same thing. I am able to use toLocaleString() to get commas to appear in my numbers that are greater than 1,000; but date.toLocaleDateString("en-us", { 'weekday': "short" })) and date.toLocaleDateString("en-us", { 'month': "short" }) always returns the date in year-month-day format.
Best AnswerAny news on this?
We should localise our apps and watchfaces for publication, so, how should this be done, if .toLocaleDateString() is not supported?
My solution is working, but not very elegant...
I haven't found anything about localisation in the documentation, so please help...
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Sorry, the device only support ES 5.1 JavaScript, and toLocaleDateString() doesn't support the formatting options in this version.
Best AnswerIs there a work-around? I want to display the time in HH:MM but not military time. I can slice off the seconds, but I really want 12-hour time.
Best AnswerThanks!
Note that if (hours == 12) hours %= 12 returns 0, so
hours = ((hours %= 12) ? 0 : 12);
Best Answer
Best AnswerI see now that Versa 2 has a different OS than Versa 3, so i retract my question. Sorry.
Best Answer