Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rxaviers
Created March 2, 2017 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rxaviers/d6ca0c74e17c203da094a1167b875b9b to your computer and use it in GitHub Desktop.
Save rxaviers/d6ca0c74e17c203da094a1167b875b9b to your computer and use it in GitHub Desktop.
diff --git a/src/date/format-properties.js b/src/date/format-properties.js
index b383957..47a2e87 100644
--- a/src/date/format-properties.js
+++ b/src/date/format-properties.js
@@ -309,28 +309,19 @@ return function( pattern, cldr, timeZone ) {
if ( length === 2 ) {
TzName = timeZone;
- }
-
- if ( exemplarCity ) {
- if ( length === 3 ) {
- TzName = exemplarCity;
- } else if ( length === 4 ) {
- TzName = formatMessage(
- cldr.main(
- "dates/timeZoneNames/regionFormat"
- ),
- [ exemplarCity ]
- );
+ } else if ( length === 3 ) {
+ TzName = exemplarCity;
+ } else if ( length === 4 ) {
+ if ( !exemplarCity ) {
+ exemplarCity = cldr.main([
+ "dates/timeZoneNames/zone/Etc/Unknown/exemplarCity"
+ ]);
}
- } else if ( !exemplarCity && length === 4 ) {
- var unKnownExemplarCity = cldr.main([
- "dates/timeZoneNames/zone/Etc/Unknown/exemplarCity"
- ]);
TzName = formatMessage(
cldr.main(
"dates/timeZoneNames/regionFormat"
),
- [ unKnownExemplarCity ]
+ [ exemplarCity ]
);
}
if ( TzName ) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment