01-10-2020 02:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-10-2020 02:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello, using the example provided by John it github for the agenda app I notice it pulls the date format as Fri 10th Jan as an example as the next event.
Could someone please confirm if this is standard or does it display differently by region. So would the US version show the month first using the same code.
This is the example I mean https://github.com/Fitbit/sdk-calendar-clock/ .
This is just so when designing this can be taken into consideration if the the text needs shortening etc.
Thanks in advance
Answered! Go to the Best Answer.

Accepted Solutions
01-10-2020 02:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-10-2020 02:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I think it may vary, so you should just extract the parts from the Date object itself.
Like myDate.getDay();

01-10-2020 02:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-10-2020 02:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You should just be getting JavaScript Date() objects from the API.
Take a look at: https://github.com/Fitbit/sdk-calendar-clock/blob/master/companion/index.js#L38
and https://github.com/Fitbit/sdk-calendar-clock/blob/master/common/utils.js#L16

01-10-2020 02:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-10-2020 02:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Oh yeah sorry, I do get that but I did a bit of messing around to see if I could get just the date to appear and I did, it displayed the date in standard UK format. This was so I could just display the date of the next appointment with an option to show how long before that appointment.
Example:
Go Shopping
20:00, Fri Jan 10 (or replace with, in 2 days)
Hope that makes sense.
Its just if I only pull the date info will it display in a different format for other regions....
So would it say:
Go Shopping,
20:00, Jan 10 Fri
For users in the US.
I'm kind of hoping its universal and displays the same for everyone.
Hope this makes sense
Thanks again

01-10-2020 02:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-10-2020 02:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I think it may vary, so you should just extract the parts from the Date object itself.
Like myDate.getDay();

01-10-2020 03:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-10-2020 03:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok cheers

05-19-2020 04:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-19-2020 04:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello i'm back....a bit dramatic. Anyway, when pulling the date format through I get "Tue May 19 2020 16:00:00 GMT + 01:00".
This i understand pulls the date in UTC time I believe. Is there anyway to make this 12 hour format? It doesn't happen automatically with user preferences.
I did not really notice but one of my users asked about 12 hour format, and as I did not really know the answer i have returned seeking assistance
Thanks in advance.

