Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Conversation

@angelaraya
Copy link
Contributor

@angelaraya angelaraya commented Dec 10, 2019

  • Implement getFormattedLocale as its own function in @lib
  • Created getClosestLocale to simplifly using locales
  • Updated DatePicker to use getClosestLocale
  • Updated DateLine to apply locale settings to the displayed values

@brownhoward brownhoward changed the title Update DateLine to use browser locales Update DateTime to use browser locales Dec 11, 2019
@james-martin-jd james-martin-jd changed the base branch from develop to release/0.5.0 December 11, 2019 22:40
*/
export const getFormattedLocale = (): string => {
const locale = getLocale().split('-');
if (locale[1]) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be clearer if it's a length check instead

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to check if locale.length > 1

@james-martin-jd james-martin-jd merged commit 20d5644 into release/0.5.0 Dec 12, 2019
@james-martin-jd james-martin-jd deleted the fix/viewer-locale branch December 12, 2019 19:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants