Skip to content

Fallback to en-US for date time formatting#2286

Merged
corinagum merged 4 commits intomicrosoft:masterfrom
compulim:fix-2231
Aug 8, 2019
Merged

Fallback to en-US for date time formatting#2286
corinagum merged 4 commits intomicrosoft:masterfrom
compulim:fix-2231

Conversation

@compulim
Copy link
Copy Markdown
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
Copy Markdown

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