Skip to content

Commit

Permalink
Extend support in countries, regions, and states in timezone's locati…
Browse files Browse the repository at this point in the history
…on list (#662)
  • Loading branch information
sanxing-chen authored and tellarin committed Jun 26, 2018
1 parent 4d7a00a commit ff3b603
Show file tree
Hide file tree
Showing 11 changed files with 765 additions and 19 deletions.
364 changes: 360 additions & 4 deletions .NET/Microsoft.Recognizers.Definitions/English/TimeZoneDefinitions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static class TimeZoneDefinitions
public const string DirectUtcRegex = @"(utc|gmt)(\s*[+\-\u00B1]?\s*[\d]{1,2}(\s*:\s*[\d]{1,2})?)?";
public const string AbbreviationsRegex = @"(\b)(AFT|AKST|AKDT|ABST|AST|ARBST|ARST|ART|ADT|ACST|AEST|AEDT|AZT|AZST|AZOT|AZOST|BST|CCST|CT|CVT|AMT|AMST|ACDT|CAST|CADT|BTT|CBT|CBST|CET|CEST|SBT|CST|CDT|CSTM|CDTM|BIT|ET|EAT|EET|EEST|ESAT|ESAST|EST|EDT|ESTM|EDTM|EGST|YEKT|FJT|FJST|GET|GMT|GNST|GNDT|GST|GTBST|HAST|HST|HADT|HDT|IST|IRST|IRDT|ISST|ISDT|JST|JDT|PETT|KST|LINT|MAGT|MAGST|MUT|MAT|MEST|MVST|MOST|WEST|MST|MDT|MSTM|MDTM|MYST|NCAST|NMST|NMDT|NPT|NZST|NZDT|NST|NDT|IRKT|KRAT|PSAT|PSAST|PST|PDT|PSTM|PDTM|PKT|PYT|PYST|RST|MSK|SAEST|SAPST|SAWST|SST|SMST|THA|SNST|SAST|SLT|SGT|TIST|TAST|TADT|TST|TOT|TOST|TRT|ULAT|UTC|VET|VLAT|AWST|WAT|ECT|WAST|WET|WPST|YAKT|PDST|PT|AWDT|COT|HKT)(\b)";
public const string FullNameRegex = @"(Afghanistan Standard Time|Alaskan Standard Time|Arab Standard Time|Arabian Standard Time|Arabic Standard Time|Argentina Standard Time|Atlantic Standard Time|AUS Central Standard Time|AUS Eastern Standard Time|Azerbaijan Standard Time|Azores Standard Time|Bahia Standard Time|Bangladesh Standard Time|Belarus Standard Time|Canada Central Standard Time|Cape Verde Standard Time|Caucasus Standard Time|Cen. Australia Standard Time|Central|Central America Standard Time|Central Asia Standard Time|Central Brazilian Standard Time|Central Europe Standard Time|Central European Standard Time|Central Pacific Standard Time|Central Standard Time|Central Standard Time|China Standard Time|Beijing time|Shanghai time|Shenzhen time|Suzhou time|Tianjian time|Chengdu time|Guangzhou time|Wuxi time|Xiamen time|Chongqing time|Shenyang time|China Time|Dateline Standard Time|E. Africa Standard Time|E. Australia Standard Time|E. Europe Standard Time|E. South America Standard Time|Eastern Time|Eastern Standard Time|Eastern Standard Time|Egypt Standard Time|Ekaterinburg Standard Time|Fiji Standard Time|FLE Standard Time|Georgian Standard Time|GMT Standard Time|Greenland Standard Time|Greenwich Standard Time|GTB Standard Time|Hawaiian Standard Time|India Standard Time|Iran Standard Time|Israel Standard Time|Jordan Standard Time|Kaliningrad Standard Time|Kamchatka Standard Time|Korea Standard Time|Libya Standard Time|Line Islands Standard Time|Magadan Standard Time|Mauritius Standard Time|Mid-Atlantic Standard Time|Middle East Standard Time|Montevideo Standard Time|Morocco Standard Time|Mountain Standard Time|Mountain Standard Time|Myanmar Standard Time|N. Central Asia Standard Time|Namibia Standard Time|Nepal Standard Time|New Zealand Standard Time|Newfoundland Standard Time|North Asia East Standard Time|North Asia Standard Time|North Korea Standard Time|Pacific SA Standard Time|Pacific Standard Time|Redmond time|Seattle time|Bellevue time|Pacific Daylight Time|Pacific Time|Pacific Standard Time|Pakistan Standard Time|Paraguay Standard Time|Romance Standard Time|Russia Time Zone 10|Russia Time Zone 11|Russia Time Zone 3|Russian Standard Time|SA Eastern Standard Time|SA Pacific Standard Time|SA Western Standard Time|Samoa Standard Time|SE Asia Standard Time|Singapore\s+(Standard\s+)?Time|South Africa Standard Time|Sri Lanka Standard Time|Syria Standard Time|Taipei Standard Time|Tasmania Standard Time|Tokyo Standard Time|Tonga Standard Time|Turkey Standard Time|Ulaanbaatar Standard Time|US Eastern Standard Time|US Mountain Standard Time|Mountain|UTC|UTC+12|UTC-02|UTC-11|Venezuela Standard Time|Vladivostok Standard Time|W. Australia Standard Time|W. Central Africa Standard Time|W. Europe Standard Time|West Asia Standard Time|West Pacific Standard Time|Yakutsk Standard Time|Pacific Daylight Saving Time|Austrialian Western Daylight Time|Colombia Time|Hong Kong Time|Austrialian West Daylight Time|Pacific|Eastern)";
public const string CityTimeSuffixRegex = @"((\s+|-)(timezone|time))";
public const string LocationTimeSuffixRegex = @"((\s+|-)(timezone|time))";
public static readonly IList<string> AmbiguousTimezoneList = new List<string>
{
"bit",
Expand Down Expand Up @@ -317,7 +317,7 @@ public static class TimeZoneDefinitions
{ "colombia time", -300 },
{ "hong kong time", 480 }
};
public static readonly IList<string> MajorCities = new List<string>
public static readonly IList<string> MajorLocations = new List<string>
{
"Aberdeen",
"Adelaide",
Expand Down Expand Up @@ -581,7 +581,6 @@ public static class TimeZoneDefinitions
"Murrieta",
"Naperville",
"New Haven",
"New York",
"Newport News",
"Norfolk",
"Norman",
Expand Down Expand Up @@ -674,7 +673,364 @@ public static class TimeZoneDefinitions
"Wilmington",
"Winston-Salem",
"Worcester",
"Yonkers"
"Yonkers",
"Afghanistan",
"AK",
"AL",
"Alabama",
"Åland",
"Åland Islands",
"Alaska",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",
"Antarctica",
"Antigua and Barbuda",
"AR",
"Argentina",
"Arizona",
"Arkansas",
"Armenia",
"Aruba",
"Australia",
"Austria",
"AZ",
"Azerbaijan",
"Bahamas",
"Bahrain",
"Bangladesh",
"Barbados",
"Belarus",
"Belgium",
"Belize",
"Benin",
"Bermuda",
"Bhutan",
"Bolivia",
"Bonaire",
"Bosnia",
"Bosnia and Herzegovina",
"Botswana",
"Bouvet Island",
"Brazil",
"British Indian Ocean Territory",
"British Virgin Islands",
"Brunei",
"Bulgaria",
"Burkina Faso",
"Burundi",
"CA",
"Cabo Verde",
"California",
"Cambodia",
"Cameroon",
"Canada",
"Cayman Islands",
"Central African Republic",
"Chad",
"Chile",
"China",
"Christmas Island",
"CO",
"Cocos Islands",
"Colombia",
"Colorado",
"Comoros",
"Congo",
"Congo (DRC)",
"Connecticut",
"Cook Islands",
"Costa Rica",
"Côte d’Ivoire",
"Croatia",
"CT",
"Cuba",
"Curaçao",
"Cyprus",
"Czechia",
"DE",
"Delaware",
"Denmark",
"Djibouti",
"Dominica",
"Dominican Republic",
"Ecuador",
"Egypt",
"El Salvador",
"Equatorial Guinea",
"Eritrea",
"Estonia",
"eSwatini",
"Ethiopia",
"Falkland Islands",
"Falklands",
"Faroe Islands",
"Fiji",
"Finland",
"FL",
"Florida",
"France",
"French Guiana",
"French Polynesia",
"French Southern Territories",
"FYROM",
"GA",
"Gabon",
"Gambia",
"Georgia",
"Georgia",
"Germany",
"Ghana",
"Gibraltar",
"Greece",
"Greenland",
"Grenada",
"Guadeloupe",
"Guam",
"Guatemala",
"Guernsey",
"Guinea",
"Guinea Bissau",
"Guinea-Bissau",
"Guyana",
"Haiti",
"Hawaii",
"Herzegovina",
"HI",
"Honduras",
"Hong Kong",
"Hungary",
"IA",
"Iceland",
"ID",
"Idaho",
"IL",
"Illinois",
"IN",
"India",
"Indiana",
"Indonesia",
"Iowa",
"Iran",
"Iraq",
"Ireland",
"Isle of Man",
"Israel",
"Italy",
"Ivory Coast",
"Jamaica",
"Jan Mayen",
"Japan",
"Jersey",
"Jordan",
"Kansas",
"Kazakhstan",
"Keeling Islands",
"Kentucky",
"Kenya",
"Kiribati",
"Korea",
"Kosovo",
"KS",
"Kuwait",
"KY",
"Kyrgyzstan",
"LA",
"Laos",
"Latvia",
"Lebanon",
"Lesotho",
"Liberia",
"Libya",
"Liechtenstein",
"Lithuania",
"Louisiana",
"Luxembourg",
"MA",
"Macao",
"Macedonia",
"Madagascar",
"Maine",
"Malawi",
"Malaysia",
"Maldives",
"Mali",
"Malta",
"Marshall Islands",
"Martinique",
"Maryland",
"Massachusetts",
"Mauritania",
"Mauritius",
"Mayotte",
"MD",
"ME",
"Mexico",
"MI",
"Michigan",
"Micronesia",
"Minnesota",
"Mississippi",
"Missouri",
"MN",
"MO",
"Moldova",
"Monaco",
"Mongolia",
"Montana",
"Montenegro",
"Montserrat",
"Morocco",
"Mozambique",
"MS",
"MT",
"Myanmar",
"Namibia",
"Nauru",
"NC",
"ND",
"NE",
"Nebraska",
"Nepal",
"Netherlands",
"Nevada",
"New Caledonia",
"New Hampshire",
"New Jersey",
"New Mexico",
"New York",
"New Zealand",
"NH",
"Nicaragua",
"Niger",
"Nigeria",
"Niue",
"NJ",
"NM",
"Norfolk Island",
"North Carolina",
"North Dakota",
"North Korea",
"Northern Mariana Islands",
"Norway",
"NV",
"NY",
"OH",
"Ohio",
"OK",
"Oklahoma",
"Oman",
"OR",
"Oregon",
"PA",
"Pakistan",
"Palau",
"Palestinian Authority",
"Panama",
"Papua New Guinea",
"Paraguay",
"Pennsylvania",
"Peru",
"Philippines",
"Pitcairn Islands",
"Poland",
"Portugal",
"Puerto Rico",
"Qatar",
"Réunion",
"Rhode Island",
"RI",
"Romania",
"Russia",
"Rwanda",
"Saba",
"Saint Barthélemy",
"Saint Kitts and Nevis",
"Saint Lucia",
"Saint Martin",
"Saint Pierre and Miquelon",
"Saint Vincent and the Grenadines",
"Samoa",
"San Marino",
"São Tomé and Príncipe",
"Saudi Arabia",
"SC",
"SD",
"Senegal",
"Serbia",
"Seychelles",
"Sierra Leone",
"Singapore",
"Sint Eustatius",
"Sint Maarten",
"Slovakia",
"Slovenia",
"Solomon Islands",
"Somalia",
"South Africa",
"South Carolina",
"South Dakota",
"South Sudan",
"Spain",
"Sri Lanka",
"Sudan",
"Suriname",
"Svalbard",
"Swaziland",
"Sweden",
"Switzerland",
"Syria",
"Taiwan",
"Tajikistan",
"Tanzania",
"Tennessee",
"Texas",
"Thailand",
"Timor-Leste",
"TN",
"Togo",
"Tokelau",
"Tonga",
"Trinidad and Tobago",
"Tunisia",
"Turkey",
"Turkmenistan",
"Turks and Caicos Islands",
"Tuvalu",
"TX",
"U.S. Outlying Islands",
"U.S. Virgin Islands",
"Uganda",
"Ukraine",
"United Arab Emirates",
"United Kingdom",
"United States",
"Uruguay",
"UT",
"Utah",
"Uzbekistan",
"VA",
"Vanuatu",
"Vatican City",
"Venezuela",
"Vermont",
"Vietnam",
"Virginia",
"VT",
"WA",
"Wallis and Futuna",
"West Virginia",
"WI",
"Wisconsin",
"WV",
"WY",
"Wyoming",
"Yemen",
"Zambia",
"Zimbabwe"
};
}
}
Loading

0 comments on commit ff3b603

Please sign in to comment.