-
Notifications
You must be signed in to change notification settings - Fork 15
Dates should be localized (glossary author) #86
Comments
We use the carbon datepicker https://www.carbondesignsystem.com/components/date-picker/code. It looks like you can specify the date input form and default text. It would need a bit of investigation, to work out how to get these strings from the locale. Also this really needs to include time as well as date, but carbon did not have a time picker when I last looked. |
Both with date and time we'll have to be very clear how that date is used. Indeed should it be rendered in user's local time, or should we always use UTC? (which brings in the very notion of day boundaries). Clearly internally it's all UTC, I'm just meaning clarity on the UI for the user to know what to enter |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
@planetf1 I have change the logic around dates and times for create in the new wizards. I have
|
Thanks @davidradl .
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
@planetf1 From your response, I think your outstanding concern is what it looks like on write. Here is a screen shot for effectivity time input. It show a placeholder with UTC greyed out. I hope this also addresses your first point about datetimes. |
you also say "On read I have installed date-fns for React - it has a standard user friendly way to display dates. It formats to something like "Friday, May 28th, 2021 at 12:00:00 AM GMT+01:00". This date package does have localisation capability." The code uses https://date-fns.org/v2.23.0/docs/format . With PPPPpppp. This is the standard long localised date and time using the standard library - this seems reasonable to me. |
The UTC reference looks good, but note that the date is in mm/dd/yyyy format, which is US format. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
I've just checked this, and with my browser set to en_GB I am still seeing the dates in mm/dd/yyyy format which is incorrect? Accept-Language header: The timezone looks fine |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
@planetf1 is there a standard at API level on how we pass dates? is it a timestamp on where we can apply the timezone and localize it, or is it just a date format outputted? |
@sarbull I think there are 2 ways Egeria APIs do this. The files is to send a UTC Date object. I thought it simpler to send the long value to the React Ui code, so I sent the milliseconds since epoch - so I change the View APIs to send the long . Ideally we would pick up the locale from the browser and use that for the dates and also the labels that includes the patterns, currently the patterns are hard coded, as I could not see an obvious way to programmatically get them at the time. |
In time we could pick the locale from a user profile and expose it as a user preference. I think picking up the browser locale is a natural next step. |
i believe using timestamp would be the way to do it for the UI, like unix epoch time yes, https://www.epochconverter.com/ but we need to have the APIs be sending us timestamps instead of any random date format that was used |
which APIs are you seeing that use a random date format ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions. |
When using the 'glossary author' UI there are Advanced options to set effectivity from/to dates
However these render in US mm/dd/yyyy format despite browser being configured in UK format
The page should use appropriate localization techniques to render the date in the appropriate format
My browser (chrome) currently offers an Accept-Language header of
Though the exact algorithm to use may require research.
The text was updated successfully, but these errors were encountered: