Created
March 2, 2017 02:13
-
-
Save rxaviers/d6ca0c74e17c203da094a1167b875b9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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