Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to en-US for date time formatting #2286

Merged
merged 4 commits into from
Aug 8, 2019

Conversation

compulim
Copy link
Contributor

@compulim compulim commented Aug 8, 2019

Fixes #2231.

Changelog Entry

  • Fix #2231. Fallback to English (US) if date time formatting failed, by @compulim in PR #XXX

Description

If the developer pass empty string ("") to Web Chat, our date time formatting function will fail with Invalid language tag:.

We should use best effort to format date time string, and fallback to en-US as last resort.

Specific Changes

  • Try-catch when formatting date time string, and fallback to en-US

  • Testing Added

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 65.124% when pulling 3243b4b on compulim:fix-2231 into cc808b5 on microsoft:master.

@corinagum corinagum merged commit 00da406 into microsoft:master Aug 8, 2019
@compulim compulim deleted the fix-2231 branch August 8, 2019 18:36
@compulim compulim mentioned this pull request Oct 25, 2019
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting empty string to language will throw an exception
3 participants