diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md
index 95d5ed91c2..f11ee957a5 100644
--- a/docs/ReleaseNotes.md
+++ b/docs/ReleaseNotes.md
@@ -12,6 +12,7 @@ Bug Fixes:
* Put base option back on ResBundle
* Fixed a few tools and dependencies so that ilib works on node v14
* Fixed a default timezone in `my-MM` to `Asia/Yangon`
+* Fixed a bug which a default script for `ky` should be `Cyrl` instead of `Arabic`
Build 009
-------
diff --git a/js/build.xml b/js/build.xml
index edfd35ebf3..370df34e70 100644
--- a/js/build.xml
+++ b/js/build.xml
@@ -53,8 +53,8 @@ limitations under the License.
-
-
+
+
diff --git a/js/data/locale/ca/AD/ctrynames.json b/js/data/locale/ca/AD/ctrynames.json
deleted file mode 100644
index 266962d0aa..0000000000
--- a/js/data/locale/ca/AD/ctrynames.json
+++ /dev/null
@@ -1,296 +0,0 @@
-{
- "Afganistan": "AF",
- "Àfrica": "002",
- "Àfrica central": "017",
- "Àfrica meridional": "018",
- "Àfrica occidental": "011",
- "Àfrica oriental": "014",
- "Àfrica septentrional": "015",
- "Àfrica subsahariana": "202",
- "Albània": "AL",
- "Alemanya": "DE",
- "Algèria": "DZ",
- "Amèrica": "019",
- "Amèrica Central": "013",
- "Amèrica del Nord": "003",
- "Amèrica del Sud": "005",
- "Amèrica Llatina": "419",
- "Amèrica septentrional": "021",
- "Andorra": "AD",
- "Angola": "AO",
- "Anguilla": "AI",
- "Antàrtida": "AQ",
- "Antigua i Barbuda": "AG",
- "Aràbia Saudita": "SA",
- "Argentina": "AR",
- "Armènia": "AM",
- "Aruba": "AW",
- "Àsia": "142",
- "Àsia central": "143",
- "Àsia meridional": "034",
- "Àsia occidental": "145",
- "Àsia oriental": "030",
- "Àsia sud-oriental": "035",
- "Australàsia": "053",
- "Austràlia": "AU",
- "Àustria": "AT",
- "Azerbaidjan": "AZ",
- "Bahames": "BS",
- "Bahrain": "BH",
- "Bangladesh": "BD",
- "Barbados": "BB",
- "Belarús": "BY",
- "Bèlgica": "BE",
- "Belize": "BZ",
- "Benín": "BJ",
- "Bermudes": "BM",
- "Bhutan": "BT",
- "Bolívia": "BO",
- "Bòsnia i Hercegovina": "BA",
- "Botswana": "BW",
- "Bouvet": "BV",
- "Brasil": "BR",
- "Brunei": "BN",
- "Bulgària": "BG",
- "Burkina Faso": "BF",
- "Burundi": "BI",
- "Cambodja": "KH",
- "Camerun": "CM",
- "Canadà": "CA",
- "Cap Verd": "CV",
- "Carib": "029",
- "Carib Neerlandès": "BQ",
- "Ceuta i Melilla": "EA",
- "Ciutat del Vaticà": "VA",
- "Colòmbia": "CO",
- "Comores": "KM",
- "Congo - Brazzaville": "CG",
- "Congo - Kinshasa": "CD",
- "Corea del Nord": "KP",
- "Corea del Sud": "KR",
- "Costa Rica": "CR",
- "Côte d’Ivoire": "CI",
- "Croàcia": "HR",
- "Cuba": "CU",
- "Curaçao": "CW",
- "Diego Garcia": "DG",
- "Dinamarca": "DK",
- "Djibouti": "DJ",
- "Dominica": "DM",
- "Egipte": "EG",
- "El Salvador": "SV",
- "Emirats Àrabs Units": "AE",
- "Equador": "EC",
- "Eritrea": "ER",
- "Eslovàquia": "SK",
- "Eslovènia": "SI",
- "Espanya": "ES",
- "Estats Units": "US",
- "Estònia": "EE",
- "eSwatini": "SZ",
- "Etiòpia": "ET",
- "Europa": "150",
- "Europa meridional": "039",
- "Europa occidental": "155",
- "Europa oriental": "151",
- "Europa septentrional": "154",
- "Fiji": "FJ",
- "Filipines": "PH",
- "Finlàndia": "FI",
- "França": "FR",
- "Gabon": "GA",
- "Gàmbia": "GM",
- "Geòrgia": "GE",
- "Ghana": "GH",
- "Gibraltar": "GI",
- "Grècia": "GR",
- "Grenada": "GD",
- "Groenlàndia": "GL",
- "Guadeloupe": "GP",
- "Guaiana Francesa": "GF",
- "Guam": "GU",
- "Guatemala": "GT",
- "Guernsey": "GG",
- "Guinea": "GN",
- "Guinea Bissau": "GW",
- "Guinea Equatorial": "GQ",
- "Guyana": "GY",
- "Haití": "HT",
- "Hondures": "HN",
- "Hong Kong (RAE Xina)": "HK",
- "Hongria": "HU",
- "Iemen": "YE",
- "Illa Christmas": "CX",
- "Illa Clipperton": "CP",
- "Illa de l’Ascensió": "AC",
- "Illa de la Reunió": "RE",
- "Illa de Man": "IM",
- "Illa Heard i Illes McDonald": "HM",
- "Illes Åland": "AX",
- "Illes Caiman": "KY",
- "Illes Canàries": "IC",
- "Illes Cocos": "CC",
- "Illes Cook": "CK",
- "Illes Fèroe": "FO",
- "Illes Geòrgia del Sud i Sandwich del Sud": "GS",
- "Illes Malvines": "FK",
- "Illes Mariannes del Nord": "MP",
- "Illes Marshall": "MH",
- "Illes Perifèriques Menors dels EUA": "UM",
- "Illes Pitcairn": "PN",
- "Illes Salomó": "SB",
- "Illes Turks i Caicos": "TC",
- "Illes Verges Britàniques": "VG",
- "Illes Verges Nord-americanes": "VI",
- "Índia": "IN",
- "Indonèsia": "ID",
- "Iran": "IR",
- "Iraq": "IQ",
- "Irlanda": "IE",
- "Islàndia": "IS",
- "Israel": "IL",
- "Itàlia": "IT",
- "Jamaica": "JM",
- "Japó": "JP",
- "Jersey": "JE",
- "Jordània": "JO",
- "Kazakhstan": "KZ",
- "Kenya": "KE",
- "Kirguizistan": "KG",
- "Kiribati": "KI",
- "Kosovo": "XK",
- "Kuwait": "KW",
- "Laos": "LA",
- "Lesotho": "LS",
- "Letònia": "LV",
- "Líban": "LB",
- "Libèria": "LR",
- "Líbia": "LY",
- "Liechtenstein": "LI",
- "Lituània": "LT",
- "Luxemburg": "LU",
- "Macau (RAE Xina)": "MO",
- "Macedònia del Nord": "MK",
- "Madagascar": "MG",
- "Malàisia": "MY",
- "Malawi": "MW",
- "Maldives": "MV",
- "Mali": "ML",
- "Malta": "MT",
- "Marroc": "MA",
- "Martinica": "MQ",
- "Maurici": "MU",
- "Mauritània": "MR",
- "Mayotte": "YT",
- "Melanèsia": "054",
- "Mèxic": "MX",
- "Micronèsia": "FM",
- "Moçambic": "MZ",
- "Moldàvia": "MD",
- "Món": "001",
- "Mònaco": "MC",
- "Mongòlia": "MN",
- "Montenegro": "ME",
- "Montserrat": "MS",
- "Myanmar (Birmània)": "MM",
- "Nacions Unides": "UN",
- "Namíbia": "NA",
- "Nauru": "NR",
- "Nepal": "NP",
- "Nicaragua": "NI",
- "Níger": "NE",
- "Nigèria": "NG",
- "Niue": "NU",
- "Norfolk": "NF",
- "Noruega": "NO",
- "Nova Caledònia": "NC",
- "Nova Zelanda": "NZ",
- "Oceania": "009",
- "Oman": "OM",
- "Països Baixos": "NL",
- "Pakistan": "PK",
- "Palau": "PW",
- "Panamà": "PA",
- "Papua Nova Guinea": "PG",
- "Paraguai": "PY",
- "Perú": "PE",
- "Polinèsia": "061",
- "Polinèsia Francesa": "PF",
- "Polònia": "PL",
- "Portugal": "PT",
- "pseudoaccents": "XA",
- "pseudobidi": "XB",
- "Puerto Rico": "PR",
- "Qatar": "QA",
- "Regió de la Micronèsia": "057",
- "regió desconeguda": "ZZ",
- "Regne Unit": "GB",
- "República Centreafricana": "CF",
- "República de Sud-àfrica": "ZA",
- "República Dominicana": "DO",
- "Romania": "RO",
- "Ruanda": "RW",
- "Rússia": "RU",
- "Sàhara Occidental": "EH",
- "Saint Barthélemy": "BL",
- "Saint Christopher i Nevis": "KN",
- "Saint Helena": "SH",
- "Saint Lucia": "LC",
- "Saint Martin": "MF",
- "Saint Vincent i les Grenadines": "VC",
- "Saint-Pierre-et-Miquelon": "PM",
- "Samoa": "WS",
- "Samoa Nord-americana": "AS",
- "San Marino": "SM",
- "São Tomé i Príncipe": "ST",
- "Senegal": "SN",
- "Sèrbia": "RS",
- "Seychelles": "SC",
- "Sierra Leone": "SL",
- "Singapur": "SG",
- "Sint Maarten": "SX",
- "Síria": "SY",
- "Somàlia": "SO",
- "Sri Lanka": "LK",
- "Sudan": "SD",
- "Sudan del Sud": "SS",
- "Suècia": "SE",
- "Suïssa": "CH",
- "Surinam": "SR",
- "Svalbard i Jan Mayen": "SJ",
- "Tadjikistan": "TJ",
- "Tailàndia": "TH",
- "Taiwan": "TW",
- "Tanzània": "TZ",
- "Territori Britànic de l’Oceà Índic": "IO",
- "Territoris allunyats d’Oceania": "QO",
- "Territoris Australs Francesos": "TF",
- "Territoris palestins": "PS",
- "Timor Oriental": "TL",
- "Togo": "TG",
- "Tokelau": "TK",
- "Tonga": "TO",
- "Trinitat i Tobago": "TT",
- "Tristan da Cunha": "TA",
- "Tunísia": "TN",
- "Turkmenistan": "TM",
- "Turquia": "TR",
- "Tuvalu": "TV",
- "Txad": "TD",
- "Txèquia": "CZ",
- "Ucraïna": "UA",
- "Uganda": "UG",
- "Unió Europea": "EU",
- "Uruguai": "UY",
- "Uzbekistan": "UZ",
- "Vanuatu": "VU",
- "Veneçuela": "VE",
- "Vietnam": "VN",
- "Wallis i Futuna": "WF",
- "Xile": "CL",
- "Xina": "CN",
- "Xipre": "CY",
- "Zàmbia": "ZM",
- "Zimbàbue": "ZW",
- "zona euro": "EZ"
-}
\ No newline at end of file
diff --git a/js/data/locale/ca/AD/ctryreverse.json b/js/data/locale/ca/AD/ctryreverse.json
deleted file mode 100644
index 9c6c027922..0000000000
--- a/js/data/locale/ca/AD/ctryreverse.json
+++ /dev/null
@@ -1,296 +0,0 @@
-{
- "142": "Àsia",
- "143": "Àsia central",
- "145": "Àsia occidental",
- "150": "Europa",
- "151": "Europa oriental",
- "154": "Europa septentrional",
- "155": "Europa occidental",
- "202": "Àfrica subsahariana",
- "419": "Amèrica Llatina",
- "AF": "Afganistan",
- "002": "Àfrica",
- "017": "Àfrica central",
- "018": "Àfrica meridional",
- "011": "Àfrica occidental",
- "014": "Àfrica oriental",
- "015": "Àfrica septentrional",
- "AL": "Albània",
- "DE": "Alemanya",
- "DZ": "Algèria",
- "019": "Amèrica",
- "013": "Amèrica Central",
- "003": "Amèrica del Nord",
- "005": "Amèrica del Sud",
- "021": "Amèrica septentrional",
- "AD": "Andorra",
- "AO": "Angola",
- "AI": "Anguilla",
- "AQ": "Antàrtida",
- "AG": "Antigua i Barbuda",
- "SA": "Aràbia Saudita",
- "AR": "Argentina",
- "AM": "Armènia",
- "AW": "Aruba",
- "034": "Àsia meridional",
- "030": "Àsia oriental",
- "035": "Àsia sud-oriental",
- "053": "Australàsia",
- "AU": "Austràlia",
- "AT": "Àustria",
- "AZ": "Azerbaidjan",
- "BS": "Bahames",
- "BH": "Bahrain",
- "BD": "Bangladesh",
- "BB": "Barbados",
- "BY": "Belarús",
- "BE": "Bèlgica",
- "BZ": "Belize",
- "BJ": "Benín",
- "BM": "Bermudes",
- "BT": "Bhutan",
- "BO": "Bolívia",
- "BA": "Bòsnia i Hercegovina",
- "BW": "Botswana",
- "BV": "Bouvet",
- "BR": "Brasil",
- "BN": "Brunei",
- "BG": "Bulgària",
- "BF": "Burkina Faso",
- "BI": "Burundi",
- "KH": "Cambodja",
- "CM": "Camerun",
- "CA": "Canadà",
- "CV": "Cap Verd",
- "029": "Carib",
- "BQ": "Carib Neerlandès",
- "EA": "Ceuta i Melilla",
- "VA": "Ciutat del Vaticà",
- "CO": "Colòmbia",
- "KM": "Comores",
- "CG": "Congo - Brazzaville",
- "CD": "Congo - Kinshasa",
- "KP": "Corea del Nord",
- "KR": "Corea del Sud",
- "CR": "Costa Rica",
- "CI": "Côte d’Ivoire",
- "HR": "Croàcia",
- "CU": "Cuba",
- "CW": "Curaçao",
- "DG": "Diego Garcia",
- "DK": "Dinamarca",
- "DJ": "Djibouti",
- "DM": "Dominica",
- "EG": "Egipte",
- "SV": "El Salvador",
- "AE": "Emirats Àrabs Units",
- "EC": "Equador",
- "ER": "Eritrea",
- "SK": "Eslovàquia",
- "SI": "Eslovènia",
- "ES": "Espanya",
- "US": "Estats Units",
- "EE": "Estònia",
- "SZ": "eSwatini",
- "ET": "Etiòpia",
- "039": "Europa meridional",
- "FJ": "Fiji",
- "PH": "Filipines",
- "FI": "Finlàndia",
- "FR": "França",
- "GA": "Gabon",
- "GM": "Gàmbia",
- "GE": "Geòrgia",
- "GH": "Ghana",
- "GI": "Gibraltar",
- "GR": "Grècia",
- "GD": "Grenada",
- "GL": "Groenlàndia",
- "GP": "Guadeloupe",
- "GF": "Guaiana Francesa",
- "GU": "Guam",
- "GT": "Guatemala",
- "GG": "Guernsey",
- "GN": "Guinea",
- "GW": "Guinea Bissau",
- "GQ": "Guinea Equatorial",
- "GY": "Guyana",
- "HT": "Haití",
- "HN": "Hondures",
- "HK": "Hong Kong (RAE Xina)",
- "HU": "Hongria",
- "YE": "Iemen",
- "CX": "Illa Christmas",
- "CP": "Illa Clipperton",
- "AC": "Illa de l’Ascensió",
- "RE": "Illa de la Reunió",
- "IM": "Illa de Man",
- "HM": "Illa Heard i Illes McDonald",
- "AX": "Illes Åland",
- "KY": "Illes Caiman",
- "IC": "Illes Canàries",
- "CC": "Illes Cocos",
- "CK": "Illes Cook",
- "FO": "Illes Fèroe",
- "GS": "Illes Geòrgia del Sud i Sandwich del Sud",
- "FK": "Illes Malvines",
- "MP": "Illes Mariannes del Nord",
- "MH": "Illes Marshall",
- "UM": "Illes Perifèriques Menors dels EUA",
- "PN": "Illes Pitcairn",
- "SB": "Illes Salomó",
- "TC": "Illes Turks i Caicos",
- "VG": "Illes Verges Britàniques",
- "VI": "Illes Verges Nord-americanes",
- "IN": "Índia",
- "ID": "Indonèsia",
- "IR": "Iran",
- "IQ": "Iraq",
- "IE": "Irlanda",
- "IS": "Islàndia",
- "IL": "Israel",
- "IT": "Itàlia",
- "JM": "Jamaica",
- "JP": "Japó",
- "JE": "Jersey",
- "JO": "Jordània",
- "KZ": "Kazakhstan",
- "KE": "Kenya",
- "KG": "Kirguizistan",
- "KI": "Kiribati",
- "XK": "Kosovo",
- "KW": "Kuwait",
- "LA": "Laos",
- "LS": "Lesotho",
- "LV": "Letònia",
- "LB": "Líban",
- "LR": "Libèria",
- "LY": "Líbia",
- "LI": "Liechtenstein",
- "LT": "Lituània",
- "LU": "Luxemburg",
- "MO": "Macau (RAE Xina)",
- "MK": "Macedònia del Nord",
- "MG": "Madagascar",
- "MY": "Malàisia",
- "MW": "Malawi",
- "MV": "Maldives",
- "ML": "Mali",
- "MT": "Malta",
- "MA": "Marroc",
- "MQ": "Martinica",
- "MU": "Maurici",
- "MR": "Mauritània",
- "YT": "Mayotte",
- "054": "Melanèsia",
- "MX": "Mèxic",
- "FM": "Micronèsia",
- "MZ": "Moçambic",
- "MD": "Moldàvia",
- "001": "Món",
- "MC": "Mònaco",
- "MN": "Mongòlia",
- "ME": "Montenegro",
- "MS": "Montserrat",
- "MM": "Myanmar (Birmània)",
- "UN": "Nacions Unides",
- "NA": "Namíbia",
- "NR": "Nauru",
- "NP": "Nepal",
- "NI": "Nicaragua",
- "NE": "Níger",
- "NG": "Nigèria",
- "NU": "Niue",
- "NF": "Norfolk",
- "NO": "Noruega",
- "NC": "Nova Caledònia",
- "NZ": "Nova Zelanda",
- "009": "Oceania",
- "OM": "Oman",
- "NL": "Països Baixos",
- "PK": "Pakistan",
- "PW": "Palau",
- "PA": "Panamà",
- "PG": "Papua Nova Guinea",
- "PY": "Paraguai",
- "PE": "Perú",
- "061": "Polinèsia",
- "PF": "Polinèsia Francesa",
- "PL": "Polònia",
- "PT": "Portugal",
- "XA": "pseudoaccents",
- "XB": "pseudobidi",
- "PR": "Puerto Rico",
- "QA": "Qatar",
- "057": "Regió de la Micronèsia",
- "ZZ": "regió desconeguda",
- "GB": "Regne Unit",
- "CF": "República Centreafricana",
- "ZA": "República de Sud-àfrica",
- "DO": "República Dominicana",
- "RO": "Romania",
- "RW": "Ruanda",
- "RU": "Rússia",
- "EH": "Sàhara Occidental",
- "BL": "Saint Barthélemy",
- "KN": "Saint Christopher i Nevis",
- "SH": "Saint Helena",
- "LC": "Saint Lucia",
- "MF": "Saint Martin",
- "VC": "Saint Vincent i les Grenadines",
- "PM": "Saint-Pierre-et-Miquelon",
- "WS": "Samoa",
- "AS": "Samoa Nord-americana",
- "SM": "San Marino",
- "ST": "São Tomé i Príncipe",
- "SN": "Senegal",
- "RS": "Sèrbia",
- "SC": "Seychelles",
- "SL": "Sierra Leone",
- "SG": "Singapur",
- "SX": "Sint Maarten",
- "SY": "Síria",
- "SO": "Somàlia",
- "LK": "Sri Lanka",
- "SD": "Sudan",
- "SS": "Sudan del Sud",
- "SE": "Suècia",
- "CH": "Suïssa",
- "SR": "Surinam",
- "SJ": "Svalbard i Jan Mayen",
- "TJ": "Tadjikistan",
- "TH": "Tailàndia",
- "TW": "Taiwan",
- "TZ": "Tanzània",
- "IO": "Territori Britànic de l’Oceà Índic",
- "QO": "Territoris allunyats d’Oceania",
- "TF": "Territoris Australs Francesos",
- "PS": "Territoris palestins",
- "TL": "Timor Oriental",
- "TG": "Togo",
- "TK": "Tokelau",
- "TO": "Tonga",
- "TT": "Trinitat i Tobago",
- "TA": "Tristan da Cunha",
- "TN": "Tunísia",
- "TM": "Turkmenistan",
- "TR": "Turquia",
- "TV": "Tuvalu",
- "TD": "Txad",
- "CZ": "Txèquia",
- "UA": "Ucraïna",
- "UG": "Uganda",
- "EU": "Unió Europea",
- "UY": "Uruguai",
- "UZ": "Uzbekistan",
- "VU": "Vanuatu",
- "VE": "Veneçuela",
- "VN": "Vietnam",
- "WF": "Wallis i Futuna",
- "CL": "Xile",
- "CN": "Xina",
- "CY": "Xipre",
- "ZM": "Zàmbia",
- "ZW": "Zimbàbue",
- "EZ": "zona euro"
-}
\ No newline at end of file
diff --git a/js/data/locale/ca/AD/dateformats.json b/js/data/locale/ca/AD/dateformats.json
deleted file mode 100644
index df75ec8c34..0000000000
--- a/js/data/locale/ca/AD/dateformats.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "gregorian": {
- "order": {
- "f": "{date} 'a' 'les' {time}",
- "l": "{date} 'a' 'les' {time}",
- "m": "{date}, {time}",
- "s": "{date} {time}"
- },
- "date": {
- "dmwy": {
- "f": "EEEE, d MMMM 'de' yyyy",
- "l": "EEE, d MMMM 'de' yyyy",
- "m": "EE, d MMM yyyy",
- "s": "E, d/M/yy"
- },
- "dmy": {
- "f": "d MMMM 'de' yyyy",
- "l": "d MMMM 'de' yyyy",
- "m": "d MMM yyyy",
- "s": "d/M/yy"
- },
- "dmw": {
- "f": "EEEE, d MMMM",
- "l": "EEE, d MMMM",
- "m": "EE, d MMM",
- "s": "E, d/M"
- },
- "dm": {
- "f": "d MMMM",
- "l": "d MMMM",
- "m": "d MMM",
- "s": "d/M"
- },
- "my": {
- "f": "LLLL 'de' yyyy",
- "l": "LLLL 'de' yyyy",
- "m": "LLL yyyy",
- "s": "M/yy"
- },
- "dw": {
- "f": "EEEE, d",
- "l": "EEE, d",
- "m": "EE, d",
- "s": "E, d"
- },
- "w": {
- "f": "EEEE",
- "l": "EEE",
- "m": "EE",
- "s": "E"
- },
- "d": {
- "f": "d",
- "l": "d",
- "m": "d",
- "s": "d"
- },
- "m": {
- "f": "MMMM",
- "l": "MMMM",
- "m": "MMM",
- "s": "M"
- },
- "y": {
- "f": "yyyy",
- "l": "yyyy",
- "m": "yyyy",
- "s": "yy"
- },
- "e": {
- "f": "cccc",
- "l": "ccc",
- "m": "cc",
- "s": "c"
- },
- "l": {
- "f": "LLLL",
- "l": "LLLL",
- "m": "LLL",
- "s": "L"
- }
- },
- "time": {
- "12": {
- "h": "h",
- "m": "mm",
- "s": "ss",
- "ah": "h a",
- "hm": "h:mm",
- "ms": "mm:ss",
- "ahm": "h:mm a",
- "hms": "h:mm:ss",
- "hmz": "h:mm z",
- "ahmz": "h:mm a z",
- "ahms": "h:mm:ss a",
- "hmsz": "h:mm:ss z",
- "ahmsz": "h:mm:ss a z"
- },
- "24": {
- "h": "H",
- "m": "mm",
- "s": "ss",
- "ah": "H",
- "hm": "H:mm",
- "ms": "mm:ss",
- "ahm": "H:mm",
- "hms": "H:mm:ss",
- "hmz": "H:mm z",
- "ahmz": "H:mm z",
- "ahms": "H:mm:ss",
- "hmsz": "H:mm:ss z",
- "ahmsz": "H:mm:ss z"
- }
- },
- "range": {
- "c00": {
- "f": "{sd} {sm} de {sy} a les {st} – {et}",
- "l": "{sd} {sm} de {sy} a les {st} – {et}",
- "m": "{sd} {sm} {sy}, {st} – {et}",
- "s": "{sd}/{sm}/{sy} {st} – {et}"
- },
- "c01": {
- "f": "{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}",
- "l": "{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}",
- "m": "{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}",
- "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
- },
- "c02": {
- "f": "{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}",
- "l": "{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}",
- "m": "{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}",
- "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
- },
- "c03": {
- "f": "{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}",
- "l": "{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}",
- "m": "{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}",
- "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
- },
- "c10": {
- "f": "{sd} – {ed} {em} de {ey}",
- "l": "{sd} – {ed} {em} de {ey}",
- "m": "{sd} – {ed} {em} {ey}",
- "s": "{sd} – {ed}/{em}/{ey}"
- },
- "c11": {
- "f": "{sd} {sm} – {ed} {em} de {ey}",
- "l": "{sd} {sm} – {ed} {em} de {ey}",
- "m": "{sd} {sm} – {ed} {em} {ey}",
- "s": "{sd}/{sm} – {ed}/{em}/{ey}"
- },
- "c12": {
- "f": "{sd} {sm} de {sy} – {ed} {em} de {ey}",
- "l": "{sd} {sm} de {sy} – {ed} {em} de {ey}",
- "m": "{sd} {sm} {sy} – {ed} {em} {ey}",
- "s": "{sd}/{sm}/{sy} – {ed}/{em}/{ey}"
- },
- "c20": {
- "f": "{sm} de {sy} – {em} de {ey}",
- "l": "{sm} de {sy} – {em} de {ey}",
- "m": "{sm} {sy} – {em} {ey}",
- "s": "{sm}/{sy} – {em}/{ey}"
- },
- "c30": {
- "f": "{sy} – {ey}",
- "l": "{sy} – {ey}",
- "m": "{sy} – {ey}",
- "s": "{sy} – {ey}"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/js/data/locale/ca/AD/unitfmt.json b/js/data/locale/ca/AD/unitfmt.json
deleted file mode 100644
index d9e0c8b1b0..0000000000
--- a/js/data/locale/ca/AD/unitfmt.json
+++ /dev/null
@@ -1,388 +0,0 @@
-{
- "unitfmt": {
- "long": {
- "times": "",
- "g-force": "#{n} força G",
- "meter-per-second-squared": "one#{n} metre per segon al quadrat|#{n} metres per segon al quadrat",
- "revolution": "one#{n} revolució|#{n} revolucions",
- "radian": "one#{n} radiant|#{n} radiants",
- "degree": "one#{n} grau|#{n} graus",
- "arc-minute": "one#{n} minut d’arc|#{n} minuts d’arc",
- "arc-second": "one#{n} segon d’arc|#{n} segons d’arc",
- "square-kilometer": "one#{n} quilòmetre quadrat|#{n} quilòmetres quadrats",
- "hectare": "one#{n} hectàrea|#{n} hectàrees",
- "square-meter": "one#{n} metre quadrat|#{n} metres quadrats",
- "square-centimeter": "one#{n} centímetre quadrat|#{n} centímetres quadrats",
- "square-mile": "one#{n} milla quadrada|#{n} milles quadrades",
- "acre": "one#{n} acre|#{n} acres",
- "square-yard": "one#{n} iarda quadrada|#{n} iardes quadrades",
- "square-foot": "one#{n} peu quadrat|#{n} peus quadrats",
- "square-inch": "one#{n} polzada quadrada|#{n} polzades quadrades",
- "dunam": "one#{n} dunam|#{n} dunams",
- "karat": "one#{n} quirat|#{n} quirats",
- "milligram-per-deciliter": "one#{n} mil·ligram per decilitre|#{n} mil·ligrams per decilitre",
- "millimole-per-liter": "one#{n} mil·limol per litre|#{n} mil·limols per litre",
- "part-per-million": "one#{n} part per milió|#{n} parts per milió",
- "percent": "#{n} per cent",
- "permille": "#{n} per mil",
- "permyriad": "#{n} per deu mil",
- "mole": "one#{n} mol|#{n} mols",
- "liter-per-kilometer": "one#{n} litre per quilòmetre|#{n} litres per quilòmetre",
- "liter-per-100kilometers": "one#{n} litre per 100 quilòmetres|#{n} litres per 100 quilòmetres",
- "mile-per-gallon": "one#{n} milla per galó|#{n} milles per galó",
- "mile-per-gallon-imperial": "one#{n} milla per galó imperial|#{n} milles per galó imperial",
- "petabyte": "one#{n} petabyte|#{n} petabytes",
- "terabyte": "one#{n} terabyte|#{n} terabytes",
- "terabit": "one#{n} terabit|#{n} terabits",
- "gigabyte": "one#{n} gigabyte|#{n} gigabytes",
- "gigabit": "one#{n} gigabit|#{n} gigabits",
- "megabyte": "one#{n} megabyte|#{n} megabytes",
- "megabit": "one#{n} megabit|#{n} megabits",
- "kilobyte": "one#{n} quilobyte|#{n} quilobytes",
- "kilobit": "one#{n} quilobit|#{n} quilobits",
- "byte": "one#{n} byte|#{n} bytes",
- "bit": "one#{n} bit|#{n} bits",
- "century": "one#{n} segle|#{n} segles",
- "decade": "one#{n} dècada|#{n} dècades",
- "year": "one#{n} any|#{n} anys",
- "month": "one#{n} mes|#{n} mesos",
- "week": "one#{n} setmana|#{n} setmanes",
- "day": "one#{n} dia|#{n} dies",
- "hour": "one#{n} hora|#{n} hores",
- "minute": "one#{n} minut|#{n} minuts",
- "second": "one#{n} segon|#{n} segons",
- "millisecond": "one#{n} mil·lisegon|#{n} mil·lisegons",
- "microsecond": "one#{n} microsegon|#{n} microsegons",
- "nanosecond": "one#{n} nanosegon|#{n} nanosegons",
- "ampere": "one#{n} ampere|#{n} amperes",
- "milliampere": "one#{n} mil·liampere|#{n} mil·liamperes",
- "ohm": "one#{n} ohm|#{n} ohms",
- "volt": "one#{n} volt|#{n} volts",
- "kilocalorie": "one#{n} quilocaloria|#{n} quilocalories",
- "calorie": "one#{n} caloria|#{n} calories",
- "foodcalorie": "one#{n} quilocaloria|#{n} quilocalories",
- "kilojoule": "one#{n} quilojoule|#{n} quilojoules",
- "joule": "one#{n} joule|#{n} joules",
- "kilowatt-hour": "one#{n} quilowatt hora|#{n} quilowatts hora",
- "electronvolt": "one#{n} electró-volt|#{n} electrons-volt",
- "british-thermal-unit": "one#{n} unitat tèrmica britànica|#{n} unitats tèrmiques britàniques",
- "therm-us": "one#{n} unitat tèrmica americana|#{n} unitats tèrmiques americanes",
- "pound-force": "one#{n} lliura de força|#{n} lliures de força",
- "newton": "one#{n} newton|#{n} newtons",
- "gigahertz": "one#{n} gigahertz|#{n} gigahertzs",
- "megahertz": "one#{n} megahertz|#{n} megahertzs",
- "kilohertz": "one#{n} quilohertz|#{n} quilohertzs",
- "hertz": "one#{n} hertz|#{n} hertzs",
- "em": "#{n} em",
- "pixel": "one#{n} píxel|#{n} píxels",
- "megapixel": "one#{n} megapíxel|#{n} megapíxels",
- "pixel-per-centimeter": "one#{n} píxel per centímetre|#{n} píxels per centímetre",
- "pixel-per-inch": "one#{n} píxel per polzada|#{n} píxels per polzada",
- "dot-per-centimeter": "one#{n} punt per centímetre|#{n} punts per centímetre",
- "dot-per-inch": "one#{n} punt per polzada|#{n} punts per polzada",
- "kilometer": "one#{n} quilòmetre|#{n} quilòmetres",
- "meter": "one#{n} metre|#{n} metres",
- "decimeter": "one#{n} decímetre|#{n} decímetres",
- "centimeter": "one#{n} centímetre|#{n} centímetres",
- "millimeter": "one#{n} mil·límetre|#{n} mil·límetres",
- "micrometer": "one#{n} micròmetre|#{n} micròmetres",
- "nanometer": "one#{n} nanòmetre|#{n} nanòmetres",
- "picometer": "one#{n} picòmetre|#{n} picòmetres",
- "mile": "one#{n} milla|#{n} milles",
- "yard": "one#{n} iarda|#{n} iardes",
- "foot": "one#{n} peu|#{n} peus",
- "inch": "one#{n} polzada|#{n} polzades",
- "parsec": "one#{n} parsec|#{n} parsecs",
- "light-year": "one#{n} any llum|#{n} anys llum",
- "astronomical-unit": "one#{n} unitat astronòmica|#{n} unitats astronòmiques",
- "furlong": "#{n} fur",
- "fathom": "#{n} fth",
- "nautical-mile": "one#{n} milla nàutica|#{n} milles nàutiques",
- "mile-scandinavian": "one#{n} milla escandinava|#{n} milles escandinaves",
- "point": "one#{n} punt|#{n} punts",
- "solar-radius": "one#{n} radi solar|#{n} radis solars",
- "lux": "one#{n} lux|#{n} luxs",
- "solar-luminosity": "one#{n} lluminositat solar|#{n} lluminositats solars",
- "metric-ton": "one#{n} tona mètrica|#{n} tones mètriques",
- "kilogram": "one#{n} quilogram|#{n} quilograms",
- "gram": "one#{n} gram|#{n} grams",
- "milligram": "one#{n} mil·ligram|#{n} mil·ligrams",
- "microgram": "one#{n} microgram|#{n} micrograms",
- "ton": "one#{n} tona|#{n} tones",
- "short-ton": "one#{n} tona|#{n} tones",
- "stone": "#{n} st",
- "pound": "one#{n} lliura|#{n} lliures",
- "ounce": "one#{n} unça|#{n} unces",
- "ounce-troy": "one#{n} unça troy|#{n} unces troy",
- "carat": "one#{n} quirat|#{n} quirats",
- "dalton": "one#{n} dalton|#{n} daltons",
- "earth-mass": "one#{n} massa de la Terra|#{n} masses de la Terra",
- "solar-mass": "one#{n} massa solar|#{n} masses solars",
- "gigawatt": "one#{n} gigawatt|#{n} gigawatts",
- "megawatt": "one#{n} megawatt|#{n} megawatts",
- "kilowatt": "one#{n} quilowatt|#{n} quilowatts",
- "watt": "one#{n} watt|#{n} watts",
- "milliwatt": "one#{n} mil·liwatt|#{n} mil·liwatts",
- "horsepower": "one#{n} cavall de vapor|#{n} cavalls de vapor",
- "millimeter-of-mercury": "one#mil·límetre de mercuri|#{n} mil·límetres de mercuri",
- "pound-per-square-inch": "one#{n} lliura per polzada quadrada|#{n} lliures per polzada quadrada",
- "inch-hg": "one#{n} polzada de mercuri|#{n} polzades de mercuri",
- "bar": "one#{n} bar|#{n} bars",
- "millibar": "one#{n} mil·libar|#{n} mil·libars",
- "atmosphere": "one#{n} atmosfera|#{n} atmosferes",
- "pascal": "one#{n} pascal|#{n} pascals",
- "hectopascal": "one#{n} hectopascal|#{n} hectopascals",
- "kilopascal": "one#{n} quilopascal|#{n} quilopascals",
- "megapascal": "one#{n} megapascal|#{n} megapascals",
- "kilometer-per-hour": "one#{n} quilòmetre per hora|#{n} quilòmetres per hora",
- "meter-per-second": "one#{n} metre per segon|#{n} metres per segon",
- "mile-per-hour": "one#{n} milla per hora|#{n} milles per hora",
- "knot": "one#{n} nus|#{n} nusos",
- "generic": "#{n}°",
- "celsius": "one#{n} grau Celsius|#{n} graus Celsius",
- "fahrenheit": "one#{n} grau Fahrenheit|#{n} graus Fahrenheit",
- "kelvin": "#{n} Kelvin",
- "pound-foot": "one#{n} lliura-peu|#{n} lliures-peu",
- "newton-meter": "one#{n} newton-metre|#{n} newtons-metre",
- "cubic-kilometer": "one#{n} quilòmetre cúbic|#{n} quilòmetres cúbics",
- "cubic-meter": "one#{n} metre cúbic|#{n} metres cúbics",
- "cubic-centimeter": "one#{n} centímetre cúbic|#{n} centímetres cúbics",
- "cubic-mile": "one#{n} milla cúbica|#{n} milles cúbiques",
- "cubic-yard": "one#{n} iarda cúbica|#{n} iardes cúbiques",
- "cubic-foot": "one#{n} peu cúbic|#{n} peus cúbics",
- "cubic-inch": "one#{n} polzada cúbica|#{n} polzades cúbiques",
- "megaliter": "one#{n} megalitre|#{n} megalitres",
- "hectoliter": "one#{n} hectolitre|#{n} hectolitres",
- "liter": "one#{n} litre|#{n} litres",
- "deciliter": "one#{n} decilitre|#{n} decilitres",
- "centiliter": "one#{n} centilitre|#{n} centilitres",
- "milliliter": "one#{n} mil·lilitre|#{n} mil·lilitres",
- "pint-metric": "one#{n} pinta mètrica|#{n} pintes mètriques",
- "cup-metric": "one#{n} tassa mètrica|#{n} tasses mètriques",
- "acre-foot": "one#{n} acre-peu|#{n} acres-peus",
- "bushel": "#{n} bu",
- "gallon": "one#{n} galó|#{n} galons",
- "gallon-imperial": "one#{n} galó imperial|#{n} galons imperials",
- "quart": "one#{n} quart|#{n} quarts",
- "pint": "one#{n} pinta|#{n} pintes",
- "cup": "one#{n} tassa|#{n} tasses",
- "fluid-ounce": "one#{n} unça líquida|#{n} unces líquides",
- "fluid-ounce-imperial": "one#{n} unça líquida imperial|#{n} unces líquides imperials",
- "tablespoon": "one#{n} cullerada|#{n} cullerades",
- "teaspoon": "one#{n} culleradeta|#{n} culleradetes",
- "barrel": "one#{n} barril|#{n} barrils",
- "coordinateUnit": "",
- "foot-per-second": "#{n} peus per segon",
- "kilometer-per-second": "#{n} quilòmetres per segon",
- "mile-per-second": "#{n} milles per segon",
- "kilometer-per-liter": "#{n} quilòmetres per litre",
- "bit-per-second": "#{n} bits per segon",
- "kilobit-per-second": "#{n} quilobits per segon",
- "megabit-per-second": "#{n} megabits per segon",
- "gigabit-per-second": "#{n} gigabits per segon",
- "terabit-per-second": "#{n} terabits per segon",
- "byte-per-second": "#{n} bytes per segon",
- "kilobyte-per-second": "#{n} quilobytes per segon",
- "megabyte-per-second": "#{n} megabytes per segon",
- "gigabyte-per-second": "#{n} gigabytes per segon",
- "terabyte-per-second": "#{n} terabytes per segon",
- "byte-per-hour": "#{n} bytes per hora",
- "kilobyte-per-hour": "#{n} quilobytes per hora",
- "megabyte-per-hour": "#{n} megabytes per hora",
- "gigabyte-per-hour": "#{n} gigabytes per hora",
- "terabyte-per-hour": "#{n} terabytes per hora"
- },
- "short": {
- "times": "",
- "g-force": "#{n} G",
- "meter-per-second-squared": "#{n} m/s²",
- "revolution": "#{n} r",
- "radian": "#{n} rad",
- "degree": "#{n}°",
- "arc-minute": "#{n} arcmin",
- "arc-second": "#{n} arcsec",
- "square-kilometer": "#{n} km²",
- "hectare": "#{n} ha",
- "square-meter": "#{n} m²",
- "square-centimeter": "#{n} cm²",
- "square-mile": "#{n} mi²",
- "acre": "#{n} ac",
- "square-yard": "#{n} yd²",
- "square-foot": "#{n} ft²",
- "square-inch": "#{n} in²",
- "dunam": "one#{n} dunam|#{n} dunams",
- "karat": "#{n} ct",
- "milligram-per-deciliter": "#{n} mg/dl",
- "millimole-per-liter": "#{n} mM/l",
- "part-per-million": "#{n} ppm",
- "percent": "#{n} %",
- "permille": "#{n} ‰",
- "permyriad": "#{n}‱",
- "mole": "#{n} mol",
- "liter-per-kilometer": "#{n} l/km",
- "liter-per-100kilometers": "#{n} l/100 km",
- "mile-per-gallon": "#{n} mi/gal",
- "mile-per-gallon-imperial": "#{n} mi/gal imp.",
- "petabyte": "#{n} PB",
- "terabyte": "#{n} TB",
- "terabit": "#{n} Tb",
- "gigabyte": "#{n} GB",
- "gigabit": "#{n} Gb",
- "megabyte": "#{n} MB",
- "megabit": "#{n} Mbit",
- "kilobyte": "#{n} kB",
- "kilobit": "#{n} kb",
- "byte": "#{n} B",
- "bit": "one#{n} bit|#{n} bits",
- "century": "one#{n} segle|#{n} segles",
- "decade": "#{n} dèc.",
- "year": "one#{n} any|#{n} anys",
- "month": "one#{n} mes|#{n} mesos",
- "week": "#{n} setm.",
- "day": "one#{n} dia|#{n} dies",
- "hour": "#{n} h",
- "minute": "#{n} min",
- "second": "#{n} s",
- "millisecond": "#{n} ms",
- "microsecond": "#{n} μs",
- "nanosecond": "#{n} ns",
- "ampere": "#{n} A",
- "milliampere": "#{n} mA",
- "ohm": "#{n} Ω",
- "volt": "#{n} V",
- "kilocalorie": "#{n} kcal",
- "calorie": "#{n} cal",
- "foodcalorie": "#{n} kcal",
- "kilojoule": "#{n} kJ",
- "joule": "#{n} J",
- "kilowatt-hour": "#{n} kWh",
- "electronvolt": "#{n} eV",
- "british-thermal-unit": "#{n} Btu",
- "therm-us": "#{n} thm",
- "pound-force": "#{n} lbf",
- "newton": "#{n} N",
- "gigahertz": "#{n} GHz",
- "megahertz": "#{n} MHz",
- "kilohertz": "#{n} kHz",
- "hertz": "#{n} Hz",
- "em": "#{n} em",
- "pixel": "#{n} px",
- "megapixel": "#{n} Mpx",
- "pixel-per-centimeter": "#{n} píxels per cm",
- "pixel-per-inch": "#{n} PPI",
- "dot-per-centimeter": "#{n} ppcm",
- "dot-per-inch": "#{n} ppp",
- "kilometer": "#{n} km",
- "meter": "#{n} m",
- "decimeter": "#{n} dm",
- "centimeter": "#{n} cm",
- "millimeter": "#{n} mm",
- "micrometer": "#{n} µm",
- "nanometer": "#{n} nm",
- "picometer": "#{n} pm",
- "mile": "#{n} mi",
- "yard": "#{n} yd",
- "foot": "#{n} ft",
- "inch": "#{n} in",
- "parsec": "#{n} pc",
- "light-year": "one#{n} any ll.|#{n} anys ll.",
- "astronomical-unit": "#{n} ua",
- "furlong": "#{n} fur",
- "fathom": "#{n} fth",
- "nautical-mile": "#{n} NM",
- "mile-scandinavian": "#{n} smi",
- "point": "#{n} pt",
- "solar-radius": "#{n} R☉",
- "lux": "#{n} lx",
- "solar-luminosity": "#{n} L☉",
- "metric-ton": "#{n} t mètr.",
- "kilogram": "#{n} kg",
- "gram": "#{n} g",
- "milligram": "#{n} mg",
- "microgram": "#{n} µg",
- "ton": "#{n} t",
- "short-ton": "#{n} t",
- "stone": "#{n} st",
- "pound": "#{n} lb",
- "ounce": "#{n} oz",
- "ounce-troy": "#{n} ozt",
- "carat": "#{n} ct",
- "dalton": "#{n} Da",
- "earth-mass": "#{n} M⊕",
- "solar-mass": "#{n} M☉",
- "gigawatt": "#{n} GW",
- "megawatt": "#{n} MW",
- "kilowatt": "#{n} kW",
- "watt": "#{n} W",
- "milliwatt": "#{n} mW",
- "horsepower": "#{n} CV",
- "millimeter-of-mercury": "#{n} mmHg",
- "pound-per-square-inch": "#{n} psi",
- "inch-hg": "#{n} inHg",
- "bar": "one#{n} bar|#{n} bars",
- "millibar": "#{n} mbar",
- "atmosphere": "#{n} atm",
- "pascal": "#{n} Pa",
- "hectopascal": "#{n} hPa",
- "kilopascal": "#{n} kPa",
- "megapascal": "#{n} MPa",
- "kilometer-per-hour": "#{n} km/h",
- "meter-per-second": "#{n} m/s",
- "mile-per-hour": "#{n} mi/h",
- "knot": "#{n} kn",
- "generic": "#{n}°",
- "celsius": "#{n} °C",
- "fahrenheit": "#{n} °F",
- "kelvin": "#{n} K",
- "pound-foot": "#{n} lbf⋅ft",
- "newton-meter": "#{n} N⋅m",
- "cubic-kilometer": "#{n} km³",
- "cubic-meter": "#{n} m³",
- "cubic-centimeter": "#{n} cm³",
- "cubic-mile": "#{n} mi³",
- "cubic-yard": "#{n} yd³",
- "cubic-foot": "#{n} ft³",
- "cubic-inch": "#{n} in³",
- "megaliter": "#{n} Ml",
- "hectoliter": "#{n} hl",
- "liter": "#{n} l",
- "deciliter": "#{n} dl",
- "centiliter": "#{n} cl",
- "milliliter": "#{n} ml",
- "pint-metric": "#{n} ptm",
- "cup-metric": "#{n} mc",
- "acre-foot": "#{n} ac ft",
- "bushel": "#{n} bu",
- "gallon": "#{n} gal",
- "gallon-imperial": "#{n} gal imp.",
- "quart": "#{n} qt",
- "pint": "#{n} pt",
- "cup": "one#{n} tassa|#{n} tasses",
- "fluid-ounce": "#{n} fl oz",
- "fluid-ounce-imperial": "#{n} fl oz imp.",
- "tablespoon": "#{n} cull.",
- "teaspoon": "#{n} cdta.",
- "barrel": "#{n} bbl",
- "coordinateUnit": "",
- "foot-per-second": "#{n} ft/s",
- "kilometer-per-second": "#{n} km/s",
- "mile-per-second": "#{n} mi/s",
- "kilometer-per-liter": "#{n} km/l",
- "bit-per-second": "#{n} bits/s",
- "kilobit-per-second": "#{n} kb/s",
- "megabit-per-second": "#{n} Mbit/s",
- "gigabit-per-second": "#{n} Gb/s",
- "terabit-per-second": "#{n} Tb/s",
- "byte-per-second": "#{n} B/s",
- "kilobyte-per-second": "#{n} kB/s",
- "megabyte-per-second": "#{n} MB/s",
- "gigabyte-per-second": "#{n} GB/s",
- "terabyte-per-second": "#{n} TB/s",
- "byte-per-hour": "#{n} B/h",
- "kilobyte-per-hour": "#{n} kB/h",
- "megabyte-per-hour": "#{n} MB/h",
- "gigabyte-per-hour": "#{n} GB/h",
- "terabyte-per-hour": "#{n} TB/h"
- }
- }
-}
\ No newline at end of file
diff --git a/js/data/locale/ca/ES/ctrynames.json b/js/data/locale/ca/ES/ctrynames.json
deleted file mode 100644
index 266962d0aa..0000000000
--- a/js/data/locale/ca/ES/ctrynames.json
+++ /dev/null
@@ -1,296 +0,0 @@
-{
- "Afganistan": "AF",
- "Àfrica": "002",
- "Àfrica central": "017",
- "Àfrica meridional": "018",
- "Àfrica occidental": "011",
- "Àfrica oriental": "014",
- "Àfrica septentrional": "015",
- "Àfrica subsahariana": "202",
- "Albània": "AL",
- "Alemanya": "DE",
- "Algèria": "DZ",
- "Amèrica": "019",
- "Amèrica Central": "013",
- "Amèrica del Nord": "003",
- "Amèrica del Sud": "005",
- "Amèrica Llatina": "419",
- "Amèrica septentrional": "021",
- "Andorra": "AD",
- "Angola": "AO",
- "Anguilla": "AI",
- "Antàrtida": "AQ",
- "Antigua i Barbuda": "AG",
- "Aràbia Saudita": "SA",
- "Argentina": "AR",
- "Armènia": "AM",
- "Aruba": "AW",
- "Àsia": "142",
- "Àsia central": "143",
- "Àsia meridional": "034",
- "Àsia occidental": "145",
- "Àsia oriental": "030",
- "Àsia sud-oriental": "035",
- "Australàsia": "053",
- "Austràlia": "AU",
- "Àustria": "AT",
- "Azerbaidjan": "AZ",
- "Bahames": "BS",
- "Bahrain": "BH",
- "Bangladesh": "BD",
- "Barbados": "BB",
- "Belarús": "BY",
- "Bèlgica": "BE",
- "Belize": "BZ",
- "Benín": "BJ",
- "Bermudes": "BM",
- "Bhutan": "BT",
- "Bolívia": "BO",
- "Bòsnia i Hercegovina": "BA",
- "Botswana": "BW",
- "Bouvet": "BV",
- "Brasil": "BR",
- "Brunei": "BN",
- "Bulgària": "BG",
- "Burkina Faso": "BF",
- "Burundi": "BI",
- "Cambodja": "KH",
- "Camerun": "CM",
- "Canadà": "CA",
- "Cap Verd": "CV",
- "Carib": "029",
- "Carib Neerlandès": "BQ",
- "Ceuta i Melilla": "EA",
- "Ciutat del Vaticà": "VA",
- "Colòmbia": "CO",
- "Comores": "KM",
- "Congo - Brazzaville": "CG",
- "Congo - Kinshasa": "CD",
- "Corea del Nord": "KP",
- "Corea del Sud": "KR",
- "Costa Rica": "CR",
- "Côte d’Ivoire": "CI",
- "Croàcia": "HR",
- "Cuba": "CU",
- "Curaçao": "CW",
- "Diego Garcia": "DG",
- "Dinamarca": "DK",
- "Djibouti": "DJ",
- "Dominica": "DM",
- "Egipte": "EG",
- "El Salvador": "SV",
- "Emirats Àrabs Units": "AE",
- "Equador": "EC",
- "Eritrea": "ER",
- "Eslovàquia": "SK",
- "Eslovènia": "SI",
- "Espanya": "ES",
- "Estats Units": "US",
- "Estònia": "EE",
- "eSwatini": "SZ",
- "Etiòpia": "ET",
- "Europa": "150",
- "Europa meridional": "039",
- "Europa occidental": "155",
- "Europa oriental": "151",
- "Europa septentrional": "154",
- "Fiji": "FJ",
- "Filipines": "PH",
- "Finlàndia": "FI",
- "França": "FR",
- "Gabon": "GA",
- "Gàmbia": "GM",
- "Geòrgia": "GE",
- "Ghana": "GH",
- "Gibraltar": "GI",
- "Grècia": "GR",
- "Grenada": "GD",
- "Groenlàndia": "GL",
- "Guadeloupe": "GP",
- "Guaiana Francesa": "GF",
- "Guam": "GU",
- "Guatemala": "GT",
- "Guernsey": "GG",
- "Guinea": "GN",
- "Guinea Bissau": "GW",
- "Guinea Equatorial": "GQ",
- "Guyana": "GY",
- "Haití": "HT",
- "Hondures": "HN",
- "Hong Kong (RAE Xina)": "HK",
- "Hongria": "HU",
- "Iemen": "YE",
- "Illa Christmas": "CX",
- "Illa Clipperton": "CP",
- "Illa de l’Ascensió": "AC",
- "Illa de la Reunió": "RE",
- "Illa de Man": "IM",
- "Illa Heard i Illes McDonald": "HM",
- "Illes Åland": "AX",
- "Illes Caiman": "KY",
- "Illes Canàries": "IC",
- "Illes Cocos": "CC",
- "Illes Cook": "CK",
- "Illes Fèroe": "FO",
- "Illes Geòrgia del Sud i Sandwich del Sud": "GS",
- "Illes Malvines": "FK",
- "Illes Mariannes del Nord": "MP",
- "Illes Marshall": "MH",
- "Illes Perifèriques Menors dels EUA": "UM",
- "Illes Pitcairn": "PN",
- "Illes Salomó": "SB",
- "Illes Turks i Caicos": "TC",
- "Illes Verges Britàniques": "VG",
- "Illes Verges Nord-americanes": "VI",
- "Índia": "IN",
- "Indonèsia": "ID",
- "Iran": "IR",
- "Iraq": "IQ",
- "Irlanda": "IE",
- "Islàndia": "IS",
- "Israel": "IL",
- "Itàlia": "IT",
- "Jamaica": "JM",
- "Japó": "JP",
- "Jersey": "JE",
- "Jordània": "JO",
- "Kazakhstan": "KZ",
- "Kenya": "KE",
- "Kirguizistan": "KG",
- "Kiribati": "KI",
- "Kosovo": "XK",
- "Kuwait": "KW",
- "Laos": "LA",
- "Lesotho": "LS",
- "Letònia": "LV",
- "Líban": "LB",
- "Libèria": "LR",
- "Líbia": "LY",
- "Liechtenstein": "LI",
- "Lituània": "LT",
- "Luxemburg": "LU",
- "Macau (RAE Xina)": "MO",
- "Macedònia del Nord": "MK",
- "Madagascar": "MG",
- "Malàisia": "MY",
- "Malawi": "MW",
- "Maldives": "MV",
- "Mali": "ML",
- "Malta": "MT",
- "Marroc": "MA",
- "Martinica": "MQ",
- "Maurici": "MU",
- "Mauritània": "MR",
- "Mayotte": "YT",
- "Melanèsia": "054",
- "Mèxic": "MX",
- "Micronèsia": "FM",
- "Moçambic": "MZ",
- "Moldàvia": "MD",
- "Món": "001",
- "Mònaco": "MC",
- "Mongòlia": "MN",
- "Montenegro": "ME",
- "Montserrat": "MS",
- "Myanmar (Birmània)": "MM",
- "Nacions Unides": "UN",
- "Namíbia": "NA",
- "Nauru": "NR",
- "Nepal": "NP",
- "Nicaragua": "NI",
- "Níger": "NE",
- "Nigèria": "NG",
- "Niue": "NU",
- "Norfolk": "NF",
- "Noruega": "NO",
- "Nova Caledònia": "NC",
- "Nova Zelanda": "NZ",
- "Oceania": "009",
- "Oman": "OM",
- "Països Baixos": "NL",
- "Pakistan": "PK",
- "Palau": "PW",
- "Panamà": "PA",
- "Papua Nova Guinea": "PG",
- "Paraguai": "PY",
- "Perú": "PE",
- "Polinèsia": "061",
- "Polinèsia Francesa": "PF",
- "Polònia": "PL",
- "Portugal": "PT",
- "pseudoaccents": "XA",
- "pseudobidi": "XB",
- "Puerto Rico": "PR",
- "Qatar": "QA",
- "Regió de la Micronèsia": "057",
- "regió desconeguda": "ZZ",
- "Regne Unit": "GB",
- "República Centreafricana": "CF",
- "República de Sud-àfrica": "ZA",
- "República Dominicana": "DO",
- "Romania": "RO",
- "Ruanda": "RW",
- "Rússia": "RU",
- "Sàhara Occidental": "EH",
- "Saint Barthélemy": "BL",
- "Saint Christopher i Nevis": "KN",
- "Saint Helena": "SH",
- "Saint Lucia": "LC",
- "Saint Martin": "MF",
- "Saint Vincent i les Grenadines": "VC",
- "Saint-Pierre-et-Miquelon": "PM",
- "Samoa": "WS",
- "Samoa Nord-americana": "AS",
- "San Marino": "SM",
- "São Tomé i Príncipe": "ST",
- "Senegal": "SN",
- "Sèrbia": "RS",
- "Seychelles": "SC",
- "Sierra Leone": "SL",
- "Singapur": "SG",
- "Sint Maarten": "SX",
- "Síria": "SY",
- "Somàlia": "SO",
- "Sri Lanka": "LK",
- "Sudan": "SD",
- "Sudan del Sud": "SS",
- "Suècia": "SE",
- "Suïssa": "CH",
- "Surinam": "SR",
- "Svalbard i Jan Mayen": "SJ",
- "Tadjikistan": "TJ",
- "Tailàndia": "TH",
- "Taiwan": "TW",
- "Tanzània": "TZ",
- "Territori Britànic de l’Oceà Índic": "IO",
- "Territoris allunyats d’Oceania": "QO",
- "Territoris Australs Francesos": "TF",
- "Territoris palestins": "PS",
- "Timor Oriental": "TL",
- "Togo": "TG",
- "Tokelau": "TK",
- "Tonga": "TO",
- "Trinitat i Tobago": "TT",
- "Tristan da Cunha": "TA",
- "Tunísia": "TN",
- "Turkmenistan": "TM",
- "Turquia": "TR",
- "Tuvalu": "TV",
- "Txad": "TD",
- "Txèquia": "CZ",
- "Ucraïna": "UA",
- "Uganda": "UG",
- "Unió Europea": "EU",
- "Uruguai": "UY",
- "Uzbekistan": "UZ",
- "Vanuatu": "VU",
- "Veneçuela": "VE",
- "Vietnam": "VN",
- "Wallis i Futuna": "WF",
- "Xile": "CL",
- "Xina": "CN",
- "Xipre": "CY",
- "Zàmbia": "ZM",
- "Zimbàbue": "ZW",
- "zona euro": "EZ"
-}
\ No newline at end of file
diff --git a/js/data/locale/ca/ES/ctryreverse.json b/js/data/locale/ca/ES/ctryreverse.json
deleted file mode 100644
index 9c6c027922..0000000000
--- a/js/data/locale/ca/ES/ctryreverse.json
+++ /dev/null
@@ -1,296 +0,0 @@
-{
- "142": "Àsia",
- "143": "Àsia central",
- "145": "Àsia occidental",
- "150": "Europa",
- "151": "Europa oriental",
- "154": "Europa septentrional",
- "155": "Europa occidental",
- "202": "Àfrica subsahariana",
- "419": "Amèrica Llatina",
- "AF": "Afganistan",
- "002": "Àfrica",
- "017": "Àfrica central",
- "018": "Àfrica meridional",
- "011": "Àfrica occidental",
- "014": "Àfrica oriental",
- "015": "Àfrica septentrional",
- "AL": "Albània",
- "DE": "Alemanya",
- "DZ": "Algèria",
- "019": "Amèrica",
- "013": "Amèrica Central",
- "003": "Amèrica del Nord",
- "005": "Amèrica del Sud",
- "021": "Amèrica septentrional",
- "AD": "Andorra",
- "AO": "Angola",
- "AI": "Anguilla",
- "AQ": "Antàrtida",
- "AG": "Antigua i Barbuda",
- "SA": "Aràbia Saudita",
- "AR": "Argentina",
- "AM": "Armènia",
- "AW": "Aruba",
- "034": "Àsia meridional",
- "030": "Àsia oriental",
- "035": "Àsia sud-oriental",
- "053": "Australàsia",
- "AU": "Austràlia",
- "AT": "Àustria",
- "AZ": "Azerbaidjan",
- "BS": "Bahames",
- "BH": "Bahrain",
- "BD": "Bangladesh",
- "BB": "Barbados",
- "BY": "Belarús",
- "BE": "Bèlgica",
- "BZ": "Belize",
- "BJ": "Benín",
- "BM": "Bermudes",
- "BT": "Bhutan",
- "BO": "Bolívia",
- "BA": "Bòsnia i Hercegovina",
- "BW": "Botswana",
- "BV": "Bouvet",
- "BR": "Brasil",
- "BN": "Brunei",
- "BG": "Bulgària",
- "BF": "Burkina Faso",
- "BI": "Burundi",
- "KH": "Cambodja",
- "CM": "Camerun",
- "CA": "Canadà",
- "CV": "Cap Verd",
- "029": "Carib",
- "BQ": "Carib Neerlandès",
- "EA": "Ceuta i Melilla",
- "VA": "Ciutat del Vaticà",
- "CO": "Colòmbia",
- "KM": "Comores",
- "CG": "Congo - Brazzaville",
- "CD": "Congo - Kinshasa",
- "KP": "Corea del Nord",
- "KR": "Corea del Sud",
- "CR": "Costa Rica",
- "CI": "Côte d’Ivoire",
- "HR": "Croàcia",
- "CU": "Cuba",
- "CW": "Curaçao",
- "DG": "Diego Garcia",
- "DK": "Dinamarca",
- "DJ": "Djibouti",
- "DM": "Dominica",
- "EG": "Egipte",
- "SV": "El Salvador",
- "AE": "Emirats Àrabs Units",
- "EC": "Equador",
- "ER": "Eritrea",
- "SK": "Eslovàquia",
- "SI": "Eslovènia",
- "ES": "Espanya",
- "US": "Estats Units",
- "EE": "Estònia",
- "SZ": "eSwatini",
- "ET": "Etiòpia",
- "039": "Europa meridional",
- "FJ": "Fiji",
- "PH": "Filipines",
- "FI": "Finlàndia",
- "FR": "França",
- "GA": "Gabon",
- "GM": "Gàmbia",
- "GE": "Geòrgia",
- "GH": "Ghana",
- "GI": "Gibraltar",
- "GR": "Grècia",
- "GD": "Grenada",
- "GL": "Groenlàndia",
- "GP": "Guadeloupe",
- "GF": "Guaiana Francesa",
- "GU": "Guam",
- "GT": "Guatemala",
- "GG": "Guernsey",
- "GN": "Guinea",
- "GW": "Guinea Bissau",
- "GQ": "Guinea Equatorial",
- "GY": "Guyana",
- "HT": "Haití",
- "HN": "Hondures",
- "HK": "Hong Kong (RAE Xina)",
- "HU": "Hongria",
- "YE": "Iemen",
- "CX": "Illa Christmas",
- "CP": "Illa Clipperton",
- "AC": "Illa de l’Ascensió",
- "RE": "Illa de la Reunió",
- "IM": "Illa de Man",
- "HM": "Illa Heard i Illes McDonald",
- "AX": "Illes Åland",
- "KY": "Illes Caiman",
- "IC": "Illes Canàries",
- "CC": "Illes Cocos",
- "CK": "Illes Cook",
- "FO": "Illes Fèroe",
- "GS": "Illes Geòrgia del Sud i Sandwich del Sud",
- "FK": "Illes Malvines",
- "MP": "Illes Mariannes del Nord",
- "MH": "Illes Marshall",
- "UM": "Illes Perifèriques Menors dels EUA",
- "PN": "Illes Pitcairn",
- "SB": "Illes Salomó",
- "TC": "Illes Turks i Caicos",
- "VG": "Illes Verges Britàniques",
- "VI": "Illes Verges Nord-americanes",
- "IN": "Índia",
- "ID": "Indonèsia",
- "IR": "Iran",
- "IQ": "Iraq",
- "IE": "Irlanda",
- "IS": "Islàndia",
- "IL": "Israel",
- "IT": "Itàlia",
- "JM": "Jamaica",
- "JP": "Japó",
- "JE": "Jersey",
- "JO": "Jordània",
- "KZ": "Kazakhstan",
- "KE": "Kenya",
- "KG": "Kirguizistan",
- "KI": "Kiribati",
- "XK": "Kosovo",
- "KW": "Kuwait",
- "LA": "Laos",
- "LS": "Lesotho",
- "LV": "Letònia",
- "LB": "Líban",
- "LR": "Libèria",
- "LY": "Líbia",
- "LI": "Liechtenstein",
- "LT": "Lituània",
- "LU": "Luxemburg",
- "MO": "Macau (RAE Xina)",
- "MK": "Macedònia del Nord",
- "MG": "Madagascar",
- "MY": "Malàisia",
- "MW": "Malawi",
- "MV": "Maldives",
- "ML": "Mali",
- "MT": "Malta",
- "MA": "Marroc",
- "MQ": "Martinica",
- "MU": "Maurici",
- "MR": "Mauritània",
- "YT": "Mayotte",
- "054": "Melanèsia",
- "MX": "Mèxic",
- "FM": "Micronèsia",
- "MZ": "Moçambic",
- "MD": "Moldàvia",
- "001": "Món",
- "MC": "Mònaco",
- "MN": "Mongòlia",
- "ME": "Montenegro",
- "MS": "Montserrat",
- "MM": "Myanmar (Birmània)",
- "UN": "Nacions Unides",
- "NA": "Namíbia",
- "NR": "Nauru",
- "NP": "Nepal",
- "NI": "Nicaragua",
- "NE": "Níger",
- "NG": "Nigèria",
- "NU": "Niue",
- "NF": "Norfolk",
- "NO": "Noruega",
- "NC": "Nova Caledònia",
- "NZ": "Nova Zelanda",
- "009": "Oceania",
- "OM": "Oman",
- "NL": "Països Baixos",
- "PK": "Pakistan",
- "PW": "Palau",
- "PA": "Panamà",
- "PG": "Papua Nova Guinea",
- "PY": "Paraguai",
- "PE": "Perú",
- "061": "Polinèsia",
- "PF": "Polinèsia Francesa",
- "PL": "Polònia",
- "PT": "Portugal",
- "XA": "pseudoaccents",
- "XB": "pseudobidi",
- "PR": "Puerto Rico",
- "QA": "Qatar",
- "057": "Regió de la Micronèsia",
- "ZZ": "regió desconeguda",
- "GB": "Regne Unit",
- "CF": "República Centreafricana",
- "ZA": "República de Sud-àfrica",
- "DO": "República Dominicana",
- "RO": "Romania",
- "RW": "Ruanda",
- "RU": "Rússia",
- "EH": "Sàhara Occidental",
- "BL": "Saint Barthélemy",
- "KN": "Saint Christopher i Nevis",
- "SH": "Saint Helena",
- "LC": "Saint Lucia",
- "MF": "Saint Martin",
- "VC": "Saint Vincent i les Grenadines",
- "PM": "Saint-Pierre-et-Miquelon",
- "WS": "Samoa",
- "AS": "Samoa Nord-americana",
- "SM": "San Marino",
- "ST": "São Tomé i Príncipe",
- "SN": "Senegal",
- "RS": "Sèrbia",
- "SC": "Seychelles",
- "SL": "Sierra Leone",
- "SG": "Singapur",
- "SX": "Sint Maarten",
- "SY": "Síria",
- "SO": "Somàlia",
- "LK": "Sri Lanka",
- "SD": "Sudan",
- "SS": "Sudan del Sud",
- "SE": "Suècia",
- "CH": "Suïssa",
- "SR": "Surinam",
- "SJ": "Svalbard i Jan Mayen",
- "TJ": "Tadjikistan",
- "TH": "Tailàndia",
- "TW": "Taiwan",
- "TZ": "Tanzània",
- "IO": "Territori Britànic de l’Oceà Índic",
- "QO": "Territoris allunyats d’Oceania",
- "TF": "Territoris Australs Francesos",
- "PS": "Territoris palestins",
- "TL": "Timor Oriental",
- "TG": "Togo",
- "TK": "Tokelau",
- "TO": "Tonga",
- "TT": "Trinitat i Tobago",
- "TA": "Tristan da Cunha",
- "TN": "Tunísia",
- "TM": "Turkmenistan",
- "TR": "Turquia",
- "TV": "Tuvalu",
- "TD": "Txad",
- "CZ": "Txèquia",
- "UA": "Ucraïna",
- "UG": "Uganda",
- "EU": "Unió Europea",
- "UY": "Uruguai",
- "UZ": "Uzbekistan",
- "VU": "Vanuatu",
- "VE": "Veneçuela",
- "VN": "Vietnam",
- "WF": "Wallis i Futuna",
- "CL": "Xile",
- "CN": "Xina",
- "CY": "Xipre",
- "ZM": "Zàmbia",
- "ZW": "Zimbàbue",
- "EZ": "zona euro"
-}
\ No newline at end of file
diff --git a/js/data/locale/ca/ES/unitfmt.json b/js/data/locale/ca/ES/unitfmt.json
deleted file mode 100644
index d9e0c8b1b0..0000000000
--- a/js/data/locale/ca/ES/unitfmt.json
+++ /dev/null
@@ -1,388 +0,0 @@
-{
- "unitfmt": {
- "long": {
- "times": "",
- "g-force": "#{n} força G",
- "meter-per-second-squared": "one#{n} metre per segon al quadrat|#{n} metres per segon al quadrat",
- "revolution": "one#{n} revolució|#{n} revolucions",
- "radian": "one#{n} radiant|#{n} radiants",
- "degree": "one#{n} grau|#{n} graus",
- "arc-minute": "one#{n} minut d’arc|#{n} minuts d’arc",
- "arc-second": "one#{n} segon d’arc|#{n} segons d’arc",
- "square-kilometer": "one#{n} quilòmetre quadrat|#{n} quilòmetres quadrats",
- "hectare": "one#{n} hectàrea|#{n} hectàrees",
- "square-meter": "one#{n} metre quadrat|#{n} metres quadrats",
- "square-centimeter": "one#{n} centímetre quadrat|#{n} centímetres quadrats",
- "square-mile": "one#{n} milla quadrada|#{n} milles quadrades",
- "acre": "one#{n} acre|#{n} acres",
- "square-yard": "one#{n} iarda quadrada|#{n} iardes quadrades",
- "square-foot": "one#{n} peu quadrat|#{n} peus quadrats",
- "square-inch": "one#{n} polzada quadrada|#{n} polzades quadrades",
- "dunam": "one#{n} dunam|#{n} dunams",
- "karat": "one#{n} quirat|#{n} quirats",
- "milligram-per-deciliter": "one#{n} mil·ligram per decilitre|#{n} mil·ligrams per decilitre",
- "millimole-per-liter": "one#{n} mil·limol per litre|#{n} mil·limols per litre",
- "part-per-million": "one#{n} part per milió|#{n} parts per milió",
- "percent": "#{n} per cent",
- "permille": "#{n} per mil",
- "permyriad": "#{n} per deu mil",
- "mole": "one#{n} mol|#{n} mols",
- "liter-per-kilometer": "one#{n} litre per quilòmetre|#{n} litres per quilòmetre",
- "liter-per-100kilometers": "one#{n} litre per 100 quilòmetres|#{n} litres per 100 quilòmetres",
- "mile-per-gallon": "one#{n} milla per galó|#{n} milles per galó",
- "mile-per-gallon-imperial": "one#{n} milla per galó imperial|#{n} milles per galó imperial",
- "petabyte": "one#{n} petabyte|#{n} petabytes",
- "terabyte": "one#{n} terabyte|#{n} terabytes",
- "terabit": "one#{n} terabit|#{n} terabits",
- "gigabyte": "one#{n} gigabyte|#{n} gigabytes",
- "gigabit": "one#{n} gigabit|#{n} gigabits",
- "megabyte": "one#{n} megabyte|#{n} megabytes",
- "megabit": "one#{n} megabit|#{n} megabits",
- "kilobyte": "one#{n} quilobyte|#{n} quilobytes",
- "kilobit": "one#{n} quilobit|#{n} quilobits",
- "byte": "one#{n} byte|#{n} bytes",
- "bit": "one#{n} bit|#{n} bits",
- "century": "one#{n} segle|#{n} segles",
- "decade": "one#{n} dècada|#{n} dècades",
- "year": "one#{n} any|#{n} anys",
- "month": "one#{n} mes|#{n} mesos",
- "week": "one#{n} setmana|#{n} setmanes",
- "day": "one#{n} dia|#{n} dies",
- "hour": "one#{n} hora|#{n} hores",
- "minute": "one#{n} minut|#{n} minuts",
- "second": "one#{n} segon|#{n} segons",
- "millisecond": "one#{n} mil·lisegon|#{n} mil·lisegons",
- "microsecond": "one#{n} microsegon|#{n} microsegons",
- "nanosecond": "one#{n} nanosegon|#{n} nanosegons",
- "ampere": "one#{n} ampere|#{n} amperes",
- "milliampere": "one#{n} mil·liampere|#{n} mil·liamperes",
- "ohm": "one#{n} ohm|#{n} ohms",
- "volt": "one#{n} volt|#{n} volts",
- "kilocalorie": "one#{n} quilocaloria|#{n} quilocalories",
- "calorie": "one#{n} caloria|#{n} calories",
- "foodcalorie": "one#{n} quilocaloria|#{n} quilocalories",
- "kilojoule": "one#{n} quilojoule|#{n} quilojoules",
- "joule": "one#{n} joule|#{n} joules",
- "kilowatt-hour": "one#{n} quilowatt hora|#{n} quilowatts hora",
- "electronvolt": "one#{n} electró-volt|#{n} electrons-volt",
- "british-thermal-unit": "one#{n} unitat tèrmica britànica|#{n} unitats tèrmiques britàniques",
- "therm-us": "one#{n} unitat tèrmica americana|#{n} unitats tèrmiques americanes",
- "pound-force": "one#{n} lliura de força|#{n} lliures de força",
- "newton": "one#{n} newton|#{n} newtons",
- "gigahertz": "one#{n} gigahertz|#{n} gigahertzs",
- "megahertz": "one#{n} megahertz|#{n} megahertzs",
- "kilohertz": "one#{n} quilohertz|#{n} quilohertzs",
- "hertz": "one#{n} hertz|#{n} hertzs",
- "em": "#{n} em",
- "pixel": "one#{n} píxel|#{n} píxels",
- "megapixel": "one#{n} megapíxel|#{n} megapíxels",
- "pixel-per-centimeter": "one#{n} píxel per centímetre|#{n} píxels per centímetre",
- "pixel-per-inch": "one#{n} píxel per polzada|#{n} píxels per polzada",
- "dot-per-centimeter": "one#{n} punt per centímetre|#{n} punts per centímetre",
- "dot-per-inch": "one#{n} punt per polzada|#{n} punts per polzada",
- "kilometer": "one#{n} quilòmetre|#{n} quilòmetres",
- "meter": "one#{n} metre|#{n} metres",
- "decimeter": "one#{n} decímetre|#{n} decímetres",
- "centimeter": "one#{n} centímetre|#{n} centímetres",
- "millimeter": "one#{n} mil·límetre|#{n} mil·límetres",
- "micrometer": "one#{n} micròmetre|#{n} micròmetres",
- "nanometer": "one#{n} nanòmetre|#{n} nanòmetres",
- "picometer": "one#{n} picòmetre|#{n} picòmetres",
- "mile": "one#{n} milla|#{n} milles",
- "yard": "one#{n} iarda|#{n} iardes",
- "foot": "one#{n} peu|#{n} peus",
- "inch": "one#{n} polzada|#{n} polzades",
- "parsec": "one#{n} parsec|#{n} parsecs",
- "light-year": "one#{n} any llum|#{n} anys llum",
- "astronomical-unit": "one#{n} unitat astronòmica|#{n} unitats astronòmiques",
- "furlong": "#{n} fur",
- "fathom": "#{n} fth",
- "nautical-mile": "one#{n} milla nàutica|#{n} milles nàutiques",
- "mile-scandinavian": "one#{n} milla escandinava|#{n} milles escandinaves",
- "point": "one#{n} punt|#{n} punts",
- "solar-radius": "one#{n} radi solar|#{n} radis solars",
- "lux": "one#{n} lux|#{n} luxs",
- "solar-luminosity": "one#{n} lluminositat solar|#{n} lluminositats solars",
- "metric-ton": "one#{n} tona mètrica|#{n} tones mètriques",
- "kilogram": "one#{n} quilogram|#{n} quilograms",
- "gram": "one#{n} gram|#{n} grams",
- "milligram": "one#{n} mil·ligram|#{n} mil·ligrams",
- "microgram": "one#{n} microgram|#{n} micrograms",
- "ton": "one#{n} tona|#{n} tones",
- "short-ton": "one#{n} tona|#{n} tones",
- "stone": "#{n} st",
- "pound": "one#{n} lliura|#{n} lliures",
- "ounce": "one#{n} unça|#{n} unces",
- "ounce-troy": "one#{n} unça troy|#{n} unces troy",
- "carat": "one#{n} quirat|#{n} quirats",
- "dalton": "one#{n} dalton|#{n} daltons",
- "earth-mass": "one#{n} massa de la Terra|#{n} masses de la Terra",
- "solar-mass": "one#{n} massa solar|#{n} masses solars",
- "gigawatt": "one#{n} gigawatt|#{n} gigawatts",
- "megawatt": "one#{n} megawatt|#{n} megawatts",
- "kilowatt": "one#{n} quilowatt|#{n} quilowatts",
- "watt": "one#{n} watt|#{n} watts",
- "milliwatt": "one#{n} mil·liwatt|#{n} mil·liwatts",
- "horsepower": "one#{n} cavall de vapor|#{n} cavalls de vapor",
- "millimeter-of-mercury": "one#mil·límetre de mercuri|#{n} mil·límetres de mercuri",
- "pound-per-square-inch": "one#{n} lliura per polzada quadrada|#{n} lliures per polzada quadrada",
- "inch-hg": "one#{n} polzada de mercuri|#{n} polzades de mercuri",
- "bar": "one#{n} bar|#{n} bars",
- "millibar": "one#{n} mil·libar|#{n} mil·libars",
- "atmosphere": "one#{n} atmosfera|#{n} atmosferes",
- "pascal": "one#{n} pascal|#{n} pascals",
- "hectopascal": "one#{n} hectopascal|#{n} hectopascals",
- "kilopascal": "one#{n} quilopascal|#{n} quilopascals",
- "megapascal": "one#{n} megapascal|#{n} megapascals",
- "kilometer-per-hour": "one#{n} quilòmetre per hora|#{n} quilòmetres per hora",
- "meter-per-second": "one#{n} metre per segon|#{n} metres per segon",
- "mile-per-hour": "one#{n} milla per hora|#{n} milles per hora",
- "knot": "one#{n} nus|#{n} nusos",
- "generic": "#{n}°",
- "celsius": "one#{n} grau Celsius|#{n} graus Celsius",
- "fahrenheit": "one#{n} grau Fahrenheit|#{n} graus Fahrenheit",
- "kelvin": "#{n} Kelvin",
- "pound-foot": "one#{n} lliura-peu|#{n} lliures-peu",
- "newton-meter": "one#{n} newton-metre|#{n} newtons-metre",
- "cubic-kilometer": "one#{n} quilòmetre cúbic|#{n} quilòmetres cúbics",
- "cubic-meter": "one#{n} metre cúbic|#{n} metres cúbics",
- "cubic-centimeter": "one#{n} centímetre cúbic|#{n} centímetres cúbics",
- "cubic-mile": "one#{n} milla cúbica|#{n} milles cúbiques",
- "cubic-yard": "one#{n} iarda cúbica|#{n} iardes cúbiques",
- "cubic-foot": "one#{n} peu cúbic|#{n} peus cúbics",
- "cubic-inch": "one#{n} polzada cúbica|#{n} polzades cúbiques",
- "megaliter": "one#{n} megalitre|#{n} megalitres",
- "hectoliter": "one#{n} hectolitre|#{n} hectolitres",
- "liter": "one#{n} litre|#{n} litres",
- "deciliter": "one#{n} decilitre|#{n} decilitres",
- "centiliter": "one#{n} centilitre|#{n} centilitres",
- "milliliter": "one#{n} mil·lilitre|#{n} mil·lilitres",
- "pint-metric": "one#{n} pinta mètrica|#{n} pintes mètriques",
- "cup-metric": "one#{n} tassa mètrica|#{n} tasses mètriques",
- "acre-foot": "one#{n} acre-peu|#{n} acres-peus",
- "bushel": "#{n} bu",
- "gallon": "one#{n} galó|#{n} galons",
- "gallon-imperial": "one#{n} galó imperial|#{n} galons imperials",
- "quart": "one#{n} quart|#{n} quarts",
- "pint": "one#{n} pinta|#{n} pintes",
- "cup": "one#{n} tassa|#{n} tasses",
- "fluid-ounce": "one#{n} unça líquida|#{n} unces líquides",
- "fluid-ounce-imperial": "one#{n} unça líquida imperial|#{n} unces líquides imperials",
- "tablespoon": "one#{n} cullerada|#{n} cullerades",
- "teaspoon": "one#{n} culleradeta|#{n} culleradetes",
- "barrel": "one#{n} barril|#{n} barrils",
- "coordinateUnit": "",
- "foot-per-second": "#{n} peus per segon",
- "kilometer-per-second": "#{n} quilòmetres per segon",
- "mile-per-second": "#{n} milles per segon",
- "kilometer-per-liter": "#{n} quilòmetres per litre",
- "bit-per-second": "#{n} bits per segon",
- "kilobit-per-second": "#{n} quilobits per segon",
- "megabit-per-second": "#{n} megabits per segon",
- "gigabit-per-second": "#{n} gigabits per segon",
- "terabit-per-second": "#{n} terabits per segon",
- "byte-per-second": "#{n} bytes per segon",
- "kilobyte-per-second": "#{n} quilobytes per segon",
- "megabyte-per-second": "#{n} megabytes per segon",
- "gigabyte-per-second": "#{n} gigabytes per segon",
- "terabyte-per-second": "#{n} terabytes per segon",
- "byte-per-hour": "#{n} bytes per hora",
- "kilobyte-per-hour": "#{n} quilobytes per hora",
- "megabyte-per-hour": "#{n} megabytes per hora",
- "gigabyte-per-hour": "#{n} gigabytes per hora",
- "terabyte-per-hour": "#{n} terabytes per hora"
- },
- "short": {
- "times": "",
- "g-force": "#{n} G",
- "meter-per-second-squared": "#{n} m/s²",
- "revolution": "#{n} r",
- "radian": "#{n} rad",
- "degree": "#{n}°",
- "arc-minute": "#{n} arcmin",
- "arc-second": "#{n} arcsec",
- "square-kilometer": "#{n} km²",
- "hectare": "#{n} ha",
- "square-meter": "#{n} m²",
- "square-centimeter": "#{n} cm²",
- "square-mile": "#{n} mi²",
- "acre": "#{n} ac",
- "square-yard": "#{n} yd²",
- "square-foot": "#{n} ft²",
- "square-inch": "#{n} in²",
- "dunam": "one#{n} dunam|#{n} dunams",
- "karat": "#{n} ct",
- "milligram-per-deciliter": "#{n} mg/dl",
- "millimole-per-liter": "#{n} mM/l",
- "part-per-million": "#{n} ppm",
- "percent": "#{n} %",
- "permille": "#{n} ‰",
- "permyriad": "#{n}‱",
- "mole": "#{n} mol",
- "liter-per-kilometer": "#{n} l/km",
- "liter-per-100kilometers": "#{n} l/100 km",
- "mile-per-gallon": "#{n} mi/gal",
- "mile-per-gallon-imperial": "#{n} mi/gal imp.",
- "petabyte": "#{n} PB",
- "terabyte": "#{n} TB",
- "terabit": "#{n} Tb",
- "gigabyte": "#{n} GB",
- "gigabit": "#{n} Gb",
- "megabyte": "#{n} MB",
- "megabit": "#{n} Mbit",
- "kilobyte": "#{n} kB",
- "kilobit": "#{n} kb",
- "byte": "#{n} B",
- "bit": "one#{n} bit|#{n} bits",
- "century": "one#{n} segle|#{n} segles",
- "decade": "#{n} dèc.",
- "year": "one#{n} any|#{n} anys",
- "month": "one#{n} mes|#{n} mesos",
- "week": "#{n} setm.",
- "day": "one#{n} dia|#{n} dies",
- "hour": "#{n} h",
- "minute": "#{n} min",
- "second": "#{n} s",
- "millisecond": "#{n} ms",
- "microsecond": "#{n} μs",
- "nanosecond": "#{n} ns",
- "ampere": "#{n} A",
- "milliampere": "#{n} mA",
- "ohm": "#{n} Ω",
- "volt": "#{n} V",
- "kilocalorie": "#{n} kcal",
- "calorie": "#{n} cal",
- "foodcalorie": "#{n} kcal",
- "kilojoule": "#{n} kJ",
- "joule": "#{n} J",
- "kilowatt-hour": "#{n} kWh",
- "electronvolt": "#{n} eV",
- "british-thermal-unit": "#{n} Btu",
- "therm-us": "#{n} thm",
- "pound-force": "#{n} lbf",
- "newton": "#{n} N",
- "gigahertz": "#{n} GHz",
- "megahertz": "#{n} MHz",
- "kilohertz": "#{n} kHz",
- "hertz": "#{n} Hz",
- "em": "#{n} em",
- "pixel": "#{n} px",
- "megapixel": "#{n} Mpx",
- "pixel-per-centimeter": "#{n} píxels per cm",
- "pixel-per-inch": "#{n} PPI",
- "dot-per-centimeter": "#{n} ppcm",
- "dot-per-inch": "#{n} ppp",
- "kilometer": "#{n} km",
- "meter": "#{n} m",
- "decimeter": "#{n} dm",
- "centimeter": "#{n} cm",
- "millimeter": "#{n} mm",
- "micrometer": "#{n} µm",
- "nanometer": "#{n} nm",
- "picometer": "#{n} pm",
- "mile": "#{n} mi",
- "yard": "#{n} yd",
- "foot": "#{n} ft",
- "inch": "#{n} in",
- "parsec": "#{n} pc",
- "light-year": "one#{n} any ll.|#{n} anys ll.",
- "astronomical-unit": "#{n} ua",
- "furlong": "#{n} fur",
- "fathom": "#{n} fth",
- "nautical-mile": "#{n} NM",
- "mile-scandinavian": "#{n} smi",
- "point": "#{n} pt",
- "solar-radius": "#{n} R☉",
- "lux": "#{n} lx",
- "solar-luminosity": "#{n} L☉",
- "metric-ton": "#{n} t mètr.",
- "kilogram": "#{n} kg",
- "gram": "#{n} g",
- "milligram": "#{n} mg",
- "microgram": "#{n} µg",
- "ton": "#{n} t",
- "short-ton": "#{n} t",
- "stone": "#{n} st",
- "pound": "#{n} lb",
- "ounce": "#{n} oz",
- "ounce-troy": "#{n} ozt",
- "carat": "#{n} ct",
- "dalton": "#{n} Da",
- "earth-mass": "#{n} M⊕",
- "solar-mass": "#{n} M☉",
- "gigawatt": "#{n} GW",
- "megawatt": "#{n} MW",
- "kilowatt": "#{n} kW",
- "watt": "#{n} W",
- "milliwatt": "#{n} mW",
- "horsepower": "#{n} CV",
- "millimeter-of-mercury": "#{n} mmHg",
- "pound-per-square-inch": "#{n} psi",
- "inch-hg": "#{n} inHg",
- "bar": "one#{n} bar|#{n} bars",
- "millibar": "#{n} mbar",
- "atmosphere": "#{n} atm",
- "pascal": "#{n} Pa",
- "hectopascal": "#{n} hPa",
- "kilopascal": "#{n} kPa",
- "megapascal": "#{n} MPa",
- "kilometer-per-hour": "#{n} km/h",
- "meter-per-second": "#{n} m/s",
- "mile-per-hour": "#{n} mi/h",
- "knot": "#{n} kn",
- "generic": "#{n}°",
- "celsius": "#{n} °C",
- "fahrenheit": "#{n} °F",
- "kelvin": "#{n} K",
- "pound-foot": "#{n} lbf⋅ft",
- "newton-meter": "#{n} N⋅m",
- "cubic-kilometer": "#{n} km³",
- "cubic-meter": "#{n} m³",
- "cubic-centimeter": "#{n} cm³",
- "cubic-mile": "#{n} mi³",
- "cubic-yard": "#{n} yd³",
- "cubic-foot": "#{n} ft³",
- "cubic-inch": "#{n} in³",
- "megaliter": "#{n} Ml",
- "hectoliter": "#{n} hl",
- "liter": "#{n} l",
- "deciliter": "#{n} dl",
- "centiliter": "#{n} cl",
- "milliliter": "#{n} ml",
- "pint-metric": "#{n} ptm",
- "cup-metric": "#{n} mc",
- "acre-foot": "#{n} ac ft",
- "bushel": "#{n} bu",
- "gallon": "#{n} gal",
- "gallon-imperial": "#{n} gal imp.",
- "quart": "#{n} qt",
- "pint": "#{n} pt",
- "cup": "one#{n} tassa|#{n} tasses",
- "fluid-ounce": "#{n} fl oz",
- "fluid-ounce-imperial": "#{n} fl oz imp.",
- "tablespoon": "#{n} cull.",
- "teaspoon": "#{n} cdta.",
- "barrel": "#{n} bbl",
- "coordinateUnit": "",
- "foot-per-second": "#{n} ft/s",
- "kilometer-per-second": "#{n} km/s",
- "mile-per-second": "#{n} mi/s",
- "kilometer-per-liter": "#{n} km/l",
- "bit-per-second": "#{n} bits/s",
- "kilobit-per-second": "#{n} kb/s",
- "megabit-per-second": "#{n} Mbit/s",
- "gigabit-per-second": "#{n} Gb/s",
- "terabit-per-second": "#{n} Tb/s",
- "byte-per-second": "#{n} B/s",
- "kilobyte-per-second": "#{n} kB/s",
- "megabyte-per-second": "#{n} MB/s",
- "gigabyte-per-second": "#{n} GB/s",
- "terabyte-per-second": "#{n} TB/s",
- "byte-per-hour": "#{n} B/h",
- "kilobyte-per-hour": "#{n} kB/h",
- "megabyte-per-hour": "#{n} MB/h",
- "gigabyte-per-hour": "#{n} GB/h",
- "terabyte-per-hour": "#{n} TB/h"
- }
- }
-}
\ No newline at end of file
diff --git a/js/data/locale/gl/dateformats.json b/js/data/locale/gl/dateformats.json
index cdc1a66d4f..e1cc67d5a9 100644
--- a/js/data/locale/gl/dateformats.json
+++ b/js/data/locale/gl/dateformats.json
@@ -120,46 +120,46 @@
"s": "{st} – {et}, {sd}/{sm}/{sy}"
},
"c01": {
- "f": "{st} do {sd} de {sm} de {sy} – {et} do d de MMMM de yyyy",
- "l": "{st} do {sd} de {sm} de {sy} – {et} do d de MMMM de yyyy",
- "m": "{st}, {sd} de {sm} de {sy} – {et}, d de MMM de yyyy",
- "s": "{st}, {sd}/{sm}/{sy} – {et}, dd/MM/yy"
+ "f": "{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}",
+ "l": "{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}",
+ "m": "{st}, {sd} de {sm} de {sy} – {et}, {ed} de {em} de {ey}",
+ "s": "{st}, {sd}/{sm}/{sy} – {et}, {ed}/{em}/{ey}"
},
"c02": {
- "f": "{st} do {sd} de {sm} de {sy} – {et} do d de MMMM de yyyy",
- "l": "{st} do {sd} de {sm} de {sy} – {et} do d de MMMM de yyyy",
- "m": "{st}, {sd} de {sm} de {sy} – {et}, d de MMM de yyyy",
- "s": "{st}, {sd}/{sm}/{sy} – {et}, dd/MM/yy"
+ "f": "{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}",
+ "l": "{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}",
+ "m": "{st}, {sd} de {sm} de {sy} – {et}, {ed} de {em} de {ey}",
+ "s": "{st}, {sd}/{sm}/{sy} – {et}, {ed}/{em}/{ey}"
},
"c03": {
- "f": "{st} do {sd} de {sm} de {sy} – {et} do d de MMMM de yyyy",
- "l": "{st} do {sd} de {sm} de {sy} – {et} do d de MMMM de yyyy",
- "m": "{st}, {sd} de {sm} de {sy} – {et}, d de MMM de yyyy",
- "s": "{st}, {sd}/{sm}/{sy} – {et}, dd/MM/yy"
+ "f": "{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}",
+ "l": "{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}",
+ "m": "{st}, {sd} de {sm} de {sy} – {et}, {ed} de {em} de {ey}",
+ "s": "{st}, {sd}/{sm}/{sy} – {et}, {ed}/{em}/{ey}"
},
"c10": {
- "f": "{date} – {date}",
- "l": "{date} – {date}",
- "m": "{date} – {date}",
- "s": "{date} – {date}"
+ "f": "{sd} – {ed} de {em} de {ey}",
+ "l": "{sd} – {ed} de {em} de {ey}",
+ "m": "{sd} – {ed} de {em} de {ey}",
+ "s": "{sd} – {ed}/{em}/{ey}"
},
"c11": {
- "f": "{date} – {date}",
- "l": "{date} – {date}",
- "m": "{date} – {date}",
- "s": "{date} – {date}"
+ "f": "{sd} de {sm} – {ed} de {em} de {ey}",
+ "l": "{sd} de {sm} – {ed} de {em} de {ey}",
+ "m": "{sd} de {sm} – {ed} de {em} de {ey}",
+ "s": "{sd}/{sm} – {ed}/{em}/{ey}"
},
"c12": {
- "f": "d de MMMM de yyyy – {date}",
- "l": "d de MMMM de yyyy – {date}",
- "m": "d de MMM de yyyy – {date}",
- "s": "dd/MM/yy – {date}"
+ "f": "{sd} de {sm} de {sy} – {ed} de {em} de {ey}",
+ "l": "{sd} de {sm} de {sy} – {ed} de {em} de {ey}",
+ "m": "{sd} de {sm} de {sy} – {ed} de {em} de {ey}",
+ "s": "{sd}/{sm}/{sy} – {ed}/{em}/{ey}"
},
"c20": {
- "f": "d de MMMM de yyyy – {date}",
- "l": "d de MMMM de yyyy – {date}",
- "m": "d de MMM de yyyy – {date}",
- "s": "dd/MM/yy – {date}"
+ "f": "{sm} de {sy} – {em} de {ey}",
+ "l": "{sm} de {sy} – {em} de {ey}",
+ "m": "{sm} de {sy} – {em} de {ey}",
+ "s": "{sm}/{sy} – {em}/{ey}"
},
"c30": {
"f": "{sy} – {ey}",
diff --git a/js/data/locale/hy/unitfmt.json b/js/data/locale/hy/unitfmt.json
index 832e66593d..6634afa74e 100644
--- a/js/data/locale/hy/unitfmt.json
+++ b/js/data/locale/hy/unitfmt.json
@@ -385,4 +385,4 @@
"terabyte-per-hour": "#{n} ՏԲ/ժ"
}
}
-}
\ No newline at end of file
+}
diff --git a/js/data/locale/ky/dateformats.json b/js/data/locale/ky/dateformats.json
index 662df71b23..7999d42c94 100644
--- a/js/data/locale/ky/dateformats.json
+++ b/js/data/locale/ky/dateformats.json
@@ -3,40 +3,40 @@
"order": "{date} {time}",
"date": {
"dmwy": {
- "f": "yyyy-'ж'., d-MMMM, EEEE",
- "l": "yyyy-'ж'., d-MMMM, EEE",
- "m": "yyyy-'ж'., d-MMM, EE",
- "s": "d/M/yy, E"
+ "f": "yyyy-'ж'., d-MMMM, EEEE",
+ "l": "yyyy-'ж'., d-MMMM, EEE",
+ "m": "yyyy-'ж'., d-MMM, EE",
+ "s": "d/M/yy, E"
},
"dmy": {
- "f": "yyyy-'ж'., d-MMMM",
- "l": "yyyy-'ж'., d-MMMM",
- "m": "yyyy-'ж'., d-MMM",
- "s": "d/M/yy"
+ "f": "yyyy-'ж'., d-MMMM",
+ "l": "yyyy-'ж'., d-MMMM",
+ "m": "yyyy-'ж'., d-MMM",
+ "s": "d/M/yy"
},
"dmw": {
- "f": "d-MMMM, EEEE",
- "l": "d-MMMM, EEE",
- "m": "d-MMM, EE",
- "s": "d/M, E"
+ "f": "d-MMMM, EEEE",
+ "l": "d-MMMM, EEE",
+ "m": "d-MMM, EE",
+ "s": "d/M, E"
},
"dm": {
- "f": "d-MMMM",
- "l": "d-MMMM",
- "m": "d-MMM",
- "s": "d/M"
+ "f": "d-MMMM",
+ "l": "d-MMMM",
+ "m": "d-MMM",
+ "s": "d/M"
},
"my": {
- "f": "yyyy-'ж'., LLLL",
- "l": "yyyy-'ж'., LLLL",
- "m": "yyyy-'ж'., LLL",
- "s": "M/yy"
+ "f": "yyyy-'ж'., LLLL",
+ "l": "yyyy-'ж'., LLLL",
+ "m": "yyyy-'ж'., LLL",
+ "s": "M/yy"
},
"dw": {
- "f": "d-EEEE",
- "l": "d-EEE",
- "m": "d-EE",
- "s": "d/E"
+ "f": "d-EEEE",
+ "l": "d-EEE",
+ "m": "d-EE",
+ "s": "d/E"
},
"w": {
"f": "EEEE",
@@ -80,87 +80,87 @@
"h": "h",
"m": "mm",
"s": "ss",
- "ah": "h a",
- "hm": "h:mm",
+ "ah": "h a",
+ "hm": "h:mm",
"ms": "mm:ss",
- "ahm": "h:mm a",
- "hms": "h:mm:ss",
- "hmz": "h:mm z",
- "ahmz": "h:mm a z",
- "ahms": "h:mm:ss a",
- "hmsz": "h:mm:ss z",
- "ahmsz": "h:mm:ss a z"
+ "ahm": "h:mm a",
+ "hms": "h:mm:ss",
+ "hmz": "h:mm z",
+ "ahmz": "h:mm a z",
+ "ahms": "h:mm:ss a",
+ "hmsz": "h:mm:ss z",
+ "ahmsz": "h:mm:ss a z"
},
"24": {
"h": "HH",
"m": "mm",
"s": "ss",
- "ah": "HH",
- "hm": "HH:mm",
+ "ah": "HH",
+ "hm": "HH:mm",
"ms": "mm:ss",
- "ahm": "HH:mm",
- "hms": "HH:mm:ss",
- "hmz": "HH:mm z",
- "ahmz": "HH:mm z",
- "ahms": "HH:mm:ss",
- "hmsz": "HH:mm:ss z",
- "ahmsz": "HH:mm:ss z"
+ "ahm": "HH:mm",
+ "hms": "HH:mm:ss",
+ "hmz": "HH:mm z",
+ "ahmz": "HH:mm z",
+ "ahms": "HH:mm:ss",
+ "hmsz": "HH:mm:ss z",
+ "ahmsz": "HH:mm:ss z"
}
},
"range": {
"c00": {
- "f": "{sy}-ж., {sd}-{sm} {st} – {et}",
- "l": "{sy}-ж., {sd}-{sm} {st} – {et}",
- "m": "{sy}-ж., {sd}-{sm} {st} – {et}",
- "s": "{sd}/{sm}/{sy} {st} – {et}"
+ "f": "{sy}-ж., {sd}-{sm} {st} – {et}",
+ "l": "{sy}-ж., {sd}-{sm} {st} – {et}",
+ "m": "{sy}-ж., {sd}-{sm} {st} – {et}",
+ "s": "{sd}/{sm}/{sy} {st} – {et}"
},
"c01": {
- "f": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "l": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "m": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
+ "f": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "l": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "m": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
},
"c02": {
- "f": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "l": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "m": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
+ "f": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "l": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "m": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
},
"c03": {
- "f": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "l": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "m": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
- "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
+ "f": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "l": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "m": "{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}",
+ "s": "{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}"
},
"c10": {
- "f": "{sy}-ж., {sd}-{sm} – {ed}-{em}",
- "l": "{sy}-ж., {sd}-{sm} – {ed}-{em}",
- "m": "{sy}-ж., {sd}-{sm} – {ed}-{em}",
- "s": "{sd} – {ed}/{em}/{ey}"
+ "f": "{sy}-ж., {sd}-{sm} – {ed}-{em}",
+ "l": "{sy}-ж., {sd}-{sm} – {ed}-{em}",
+ "m": "{sy}-ж., {sd}-{sm} – {ed}-{em}",
+ "s": "{sd} – {ed}/{em}/{ey}"
},
"c11": {
- "f": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
- "l": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
- "m": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
- "s": "{sd}/{sm} – {ed}/{em}/{ey}"
+ "f": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
+ "l": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
+ "m": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
+ "s": "{sd}/{sm} – {ed}/{em}/{ey}"
},
"c12": {
- "f": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
- "l": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
- "m": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
- "s": "{sd}/{sm}/{sy} – {ed}/{em}/{ey}"
+ "f": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
+ "l": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
+ "m": "{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}",
+ "s": "{sd}/{sm}/{sy} – {ed}/{em}/{ey}"
},
"c20": {
- "f": "{sy}-ж., {sm} – {ey}-ж., {em}",
- "l": "{sy}-ж., {sm} – {ey}-ж., {em}",
- "m": "{sy}-ж., {sm} – {ey}-ж., {em}",
- "s": "{sm}/{sy} – {em}/{ey}"
+ "f": "{sy}-ж., {sm} – {ey}-ж., {em}",
+ "l": "{sy}-ж., {sm} – {ey}-ж., {em}",
+ "m": "{sy}-ж., {sm} – {ey}-ж., {em}",
+ "s": "{sm}/{sy} – {em}/{ey}"
},
"c30": {
- "f": "{sy} – {ey}",
- "l": "{sy} – {ey}",
- "m": "{sy} – {ey}",
- "s": "{sy} – {ey}"
+ "f": "{sy} – {ey}",
+ "l": "{sy} – {ey}",
+ "m": "{sy} – {ey}",
+ "s": "{sy} – {ey}"
}
}
}
diff --git a/js/data/locale/ky/scripts.jf b/js/data/locale/ky/scripts.jf
index e7638ec9e0..9a7500e3e6 100644
--- a/js/data/locale/ky/scripts.jf
+++ b/js/data/locale/ky/scripts.jf
@@ -1,7 +1,7 @@
{
"scripts": [
- "Arab",
"Cyrl",
+ "Arab",
"Latn"
],
"generated": true
diff --git a/js/data/locale/ky/sysres.json b/js/data/locale/ky/sysres.json
index 4430e14c1f..11dc15ec70 100644
--- a/js/data/locale/ky/sysres.json
+++ b/js/data/locale/ky/sysres.json
@@ -187,48 +187,48 @@
"#{num}w": "one#{num} ап|#{num} ап",
"durationShortMonths": "one#{num} ай|#{num} ай",
"#{num}y": "one#{num} ж.|#{num} ж.",
- "1#in 1 second|#in {num} seconds": "one#{num} секунддан кийин|#{num} секунддан кийин",
- "1#in 1 minute|#in {num} minutes": "one#{num} мүнөттөн кийин|#{num} мүнөттөн кийин",
- "1#in 1 hour|#in {num} hours": "one#{num} сааттан кийин|#{num} сааттан кийин",
- "1#in 1 day|#in {num} days": "one#{num} күндөн кийин|#{num} күндөн кийин",
- "1#in 1 week|#in {num} weeks": "one#{num} аптадан кийин|#{num} аптадан кийин",
- "1#in 1 month|#in {num} months": "one#{num} айдан кийин|#{num} айдан кийин",
- "1#in 1 year|#in {num} years": "one#{num} жылдан кийин|#{num} жылдан кийин",
- "1#in 1 sec|#in {num} sec": "one#{num} секунддан кийин|#{num} секунддан кийин",
- "1#in 1 min|#in {num} min": "one#{num} мүнөттөн кийин|#{num} мүнөттөн кийин",
- "1#in 1 hr|#in {num} hrs": "one#{num} сааттан кийин|#{num} сааттан кийин",
- "1#in 1 dy|#in {num} dys": "one#{num} күндөн кийин|#{num} күндөн кийин",
- "1#in 1 wk|#in {num} wks": "one#{num} аптадан кийин|#{num} аптадан кийин",
- "1#in 1 mon|#in {num} mons": "one#{num} айдан кийин|#{num} айдан кийин",
- "1#in 1 yr|#in {num} yrs": "one#{num} жылдан кийин|#{num} жылдан кийин",
- "#in {num}s": "one#{num} сек. кийин|#{num} сек. кийин",
- "#in {num}mi": "one#{num} мүн. кийин|#{num} мүн. кийин",
- "#in {num}h": "one#{num} саат. кийин|#{num} саат. кийин",
- "#in {num}d": "one#{num} күн. кийин|#{num} күн. кийин",
- "#in {num}w": "one#{num} апт. кийин|#{num} апт. кийин",
- "#in {num}mo": "one#{num} айд. кийин|#{num} айд. кийин",
- "#in {num}y": "one#{num} жыл. кийин|#{num} жыл. кийин",
- "1#1 second ago|#{num} seconds ago": "one#{num} секунд мурун|#{num} секунд мурун",
- "1#1 minute ago|#{num} minutes ago": "one#{num} мүнөт мурун|#{num} мүнөт мурун",
- "1#1 hour ago|#{num} hours ago": "one#{num} саат мурун|#{num} саат мурун",
- "1#1 day ago|#{num} days ago": "one#{num} күн мурун|#{num} күн мурун",
- "1#1 week ago|#{num} weeks ago": "one#{num} апта мурун|#{num} апта мурун",
- "1#1 month ago|#{num} months ago": "one#{num} ай мурун|#{num} ай мурун",
- "1#1 year ago|#{num} years ago": "one#{num} жыл мурун|#{num} жыл мурун",
- "1#1 sec ago|#{num} sec ago": "one#{num} секунд мурун|#{num} секунд мурун",
- "1#1 min ago|#{num} min ago": "one#{num} мүнөт мурун|#{num} мүнөт мурун",
- "1#1 hr ago|#{num} hrs ago": "one#{num} саат мурун|#{num} саат мурун",
- "1#1 dy ago|#{num} dys ago": "one#{num} күн мурун|#{num} күн мурун",
- "1#1 wk ago|#{num} wks ago": "one#{num} апта мурун|#{num} апта мурун",
- "1#1 mon ago|#{num} mons ago": "one#{num} ай мурун|#{num} ай мурун",
- "1#1 yr ago|#{num} yrs ago": "one#{num} жыл мурун|#{num} жыл мурун",
- "#{num}s ago": "one#{num} сек. мурун|#{num} сек. мурун",
- "#{num}mi ago": "one#{num} мүн. мурун|#{num} мүн. мурун",
- "#{num}h ago": "one#{num} саат. мурун|#{num} саат. мурун",
- "#{num}d ago": "one#{num} күн мурун|#{num} күн мурун",
- "#{num}w ago": "one#{num} апт. мурун|#{num} апт. мурун",
- "#{num}mo ago": "one#{num} ай мурун|#{num} ай мурун",
- "#{num}y ago": "one#{num} жыл мурун|#{num} жыл мурун",
+ "1#in 1 second|#in {num} seconds": "one#{num} секунддан кийин|#{num} секунддан кийин",
+ "1#in 1 minute|#in {num} minutes": "one#{num} мүнөттөн кийин|#{num} мүнөттөн кийин",
+ "1#in 1 hour|#in {num} hours": "one#{num} сааттан кийин|#{num} сааттан кийин",
+ "1#in 1 day|#in {num} days": "one#{num} күндөн кийин|#{num} күндөн кийин",
+ "1#in 1 week|#in {num} weeks": "one#{num} аптадан кийин|#{num} аптадан кийин",
+ "1#in 1 month|#in {num} months": "one#{num} айдан кийин|#{num} айдан кийин",
+ "1#in 1 year|#in {num} years": "one#{num} жылдан кийин|#{num} жылдан кийин",
+ "1#in 1 sec|#in {num} sec": "one#{num} секунддан кийин|#{num} секунддан кийин",
+ "1#in 1 min|#in {num} min": "one#{num} мүнөттөн кийин|#{num} мүнөттөн кийин",
+ "1#in 1 hr|#in {num} hrs": "one#{num} сааттан кийин|#{num} сааттан кийин",
+ "1#in 1 dy|#in {num} dys": "one#{num} күндөн кийин|#{num} күндөн кийин",
+ "1#in 1 wk|#in {num} wks": "one#{num} аптадан кийин|#{num} аптадан кийин",
+ "1#in 1 mon|#in {num} mons": "one#{num} айдан кийин|#{num} айдан кийин",
+ "1#in 1 yr|#in {num} yrs": "one#{num} жылдан кийин|#{num} жылдан кийин",
+ "#in {num}s": "one#{num} сек. кийин|#{num} сек. кийин",
+ "#in {num}mi": "one#{num} мүн. кийин|#{num} мүн. кийин",
+ "#in {num}h": "one#{num} саат. кийин|#{num} саат. кийин",
+ "#in {num}d": "one#{num} күн. кийин|#{num} күн. кийин",
+ "#in {num}w": "one#{num} апт. кийин|#{num} апт. кийин",
+ "#in {num}mo": "one#{num} айд. кийин|#{num} айд. кийин",
+ "#in {num}y": "one#{num} жыл. кийин|#{num} жыл. кийин",
+ "1#1 second ago|#{num} seconds ago": "one#{num} секунд мурун|#{num} секунд мурун",
+ "1#1 minute ago|#{num} minutes ago": "one#{num} мүнөт мурун|#{num} мүнөт мурун",
+ "1#1 hour ago|#{num} hours ago": "one#{num} саат мурун|#{num} саат мурун",
+ "1#1 day ago|#{num} days ago": "one#{num} күн мурун|#{num} күн мурун",
+ "1#1 week ago|#{num} weeks ago": "one#{num} апта мурун|#{num} апта мурун",
+ "1#1 month ago|#{num} months ago": "one#{num} ай мурун|#{num} ай мурун",
+ "1#1 year ago|#{num} years ago": "one#{num} жыл мурун|#{num} жыл мурун",
+ "1#1 sec ago|#{num} sec ago": "one#{num} секунд мурун|#{num} секунд мурун",
+ "1#1 min ago|#{num} min ago": "one#{num} мүнөт мурун|#{num} мүнөт мурун",
+ "1#1 hr ago|#{num} hrs ago": "one#{num} саат мурун|#{num} саат мурун",
+ "1#1 dy ago|#{num} dys ago": "one#{num} күн мурун|#{num} күн мурун",
+ "1#1 wk ago|#{num} wks ago": "one#{num} апта мурун|#{num} апта мурун",
+ "1#1 mon ago|#{num} mons ago": "one#{num} ай мурун|#{num} ай мурун",
+ "1#1 yr ago|#{num} yrs ago": "one#{num} жыл мурун|#{num} жыл мурун",
+ "#{num}s ago": "one#{num} сек. мурун|#{num} сек. мурун",
+ "#{num}mi ago": "one#{num} мүн. мурун|#{num} мүн. мурун",
+ "#{num}h ago": "one#{num} саат. мурун|#{num} саат. мурун",
+ "#{num}d ago": "one#{num} күн мурун|#{num} күн мурун",
+ "#{num}w ago": "one#{num} апт. мурун|#{num} апт. мурун",
+ "#{num}mo ago": "one#{num} ай мурун|#{num} ай мурун",
+ "#{num}y ago": "one#{num} жыл мурун|#{num} жыл мурун",
"separatorFull": ", ",
"finalSeparatorFull": ", ",
"separatorLong": ", ",
diff --git a/js/test/date/testDayOfWeek.js b/js/test/date/testDayOfWeek.js
index 7661a51307..e5d595f743 100644
--- a/js/test/date/testDayOfWeek.js
+++ b/js/test/date/testDayOfWeek.js
@@ -1969,6 +1969,76 @@ module.exports.testweekdata = {
test.equal(info.getWeekEndEnd(), 0);
test.done();
},
+ testWeekData_be_BY: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("be-BY");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 1);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_lo_LA: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("lo-LA");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 0);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_ky_KG: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("ky-KG");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 1);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_ca_AD: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("ca-AD");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 1);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_ca_ES: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("ca-ES");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 1);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_hy_AM: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("hy-AM");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 1);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_gl_ES: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("gl-ES");
+ test.ok(info !== null);
+
+ test.equal(info.getFirstDayOfWeek(), 1);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
testWeekData_eu_ES: function(test) {
test.expect(4);
var info = new LocaleInfo("eu-ES");
@@ -1984,6 +2054,16 @@ module.exports.testweekdata = {
var info = new LocaleInfo("my-MM");
test.ok(info !== null);
+ test.equal(info.getFirstDayOfWeek(), 0);
+ test.equal(info.getWeekEndStart(), 6);
+ test.equal(info.getWeekEndEnd(), 0);
+ test.done();
+ },
+ testWeekData_ne_NP: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("ne-NP");
+ test.ok(info !== null);
+
test.equal(info.getFirstDayOfWeek(), 0);
test.equal(info.getWeekEndStart(), 6);
test.equal(info.getWeekEndEnd(), 0);
diff --git a/js/test/date/testMeridiems.js b/js/test/date/testMeridiems.js
index 77727173d9..dfd97c6fcb 100644
--- a/js/test/date/testMeridiems.js
+++ b/js/test/date/testMeridiems.js
@@ -1974,6 +1974,73 @@ module.exports.testmeridiems = {
test.done();
},
+ testMeridiem_be_BY: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"be-BY"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "AM");
+ test.equal(fmt[1].name, "PM");
+ test.done();
+ },
+ testMeridiem_lo_LA: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"lo-LA"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "ກ່ອນທ່ຽງ");
+ test.equal(fmt[1].name, "ຫຼັງທ່ຽງ");
+
+ test.done();
+ },
+ testMeridiem_ky_KG: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"ky-KG"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "таңкы");
+ test.equal(fmt[1].name, "түштөн кийинки");
+
+ test.done();
+ },
+ testMeridiem_ca_AD: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"ca-AD"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "a. m.");
+ test.equal(fmt[1].name, "p. m.");
+
+ test.done();
+ },
+ testMeridiem_ca_ES: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"ca-ES"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "a. m.");
+ test.equal(fmt[1].name, "p. m.");
+ test.done();
+ },
+ testMeridiem_hy_AM: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"hy-AM"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "AM");
+ test.equal(fmt[1].name, "PM");
+ test.done();
+ },
+ testMeridiem_gl_ES: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"gl-ES"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "a.m.");
+ test.equal(fmt[1].name, "p.m.");
+
+ test.done();
+ },
testMeridiem_en_ES: function(test) {
test.expect(3);
var fmt = DateFmt.getMeridiemsRange({locale:"eu-ES"});
@@ -1981,6 +2048,15 @@ module.exports.testmeridiems = {
test.equal(fmt[0].name, "AM");
test.equal(fmt[1].name, "PM");
+ test.done();
+ },
+ testMeridiem_ne_NP: function(test) {
+ test.expect(3);
+ var fmt = DateFmt.getMeridiemsRange({locale:"ne-NP"});
+ test.ok(fmt !== null);
+
+ test.equal(fmt[0].name, "पूर्वाह्न");
+ test.equal(fmt[1].name, "अपराह्न");
test.done();
},
diff --git a/js/test/date/testMonthTranslation.js b/js/test/date/testMonthTranslation.js
index e16e37984f..9357f1b775 100644
--- a/js/test/date/testMonthTranslation.js
+++ b/js/test/date/testMonthTranslation.js
@@ -7317,6 +7317,292 @@ module.exports.testmonthtranslation = {
test.done();
},
+ testMonthTranslate_be_BY: function(test) {
+ test.expect(12);
+
+ // full, long: MMMM
+ // short, medium: MM
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"be-BY", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "студзень");
+ test.equal(value[1], "люты");
+ test.equal(value[2], "сакавік");
+ test.equal(value[3], "красавік");
+ test.equal(value[4], "май");
+ test.equal(value[5], "чэрвень");
+ test.equal(value[6], "ліпень");
+ test.equal(value[7], "жнівень");
+ test.equal(value[8], "верасень");
+ test.equal(value[9], "кастрычнік");
+ test.equal(value[10], "лістапад");
+ test.equal(value[11], "снежань");
+ test.done();
+ },
+ testMonthTranslate_lo_LA: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: MM
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"lo-LA", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "ມັງກອນ");
+ test.equal(value[1], "ກຸມພາ");
+ test.equal(value[2], "ມີນາ");
+ test.equal(value[3], "ເມສາ");
+ test.equal(value[4], "ພຶດສະພາ");
+ test.equal(value[5], "ມິຖຸນາ");
+ test.equal(value[6], "ກໍລະກົດ");
+ test.equal(value[7], "ສິງຫາ");
+ test.equal(value[8], "ກັນຍາ");
+ test.equal(value[9], "ຕຸລາ");
+ test.equal(value[10], "ພະຈິກ");
+ test.equal(value[11], "ທັນວາ");
+
+ var fmt = new DateFmt({locale:"lo-LA", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "ມ.ກ.");
+ test.equal(value[1], "ກ.ພ.");
+ test.equal(value[2], "ມ.ນ.");
+ test.equal(value[3], "ມ.ສ.");
+ test.equal(value[4], "ພ.ພ.");
+ test.equal(value[5], "ມິ.ຖ.");
+ test.equal(value[6], "ກ.ລ.");
+ test.equal(value[7], "ສ.ຫ.");
+ test.equal(value[8], "ກ.ຍ.");
+ test.equal(value[9], "ຕ.ລ.");
+ test.equal(value[10], "ພ.ຈ.");
+ test.equal(value[11], "ທ.ວ.");
+ test.done();
+ },
+ testMonthTranslate_ky_KG: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: M
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"ky-KG", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "Январь");
+ test.equal(value[1], "Февраль");
+ test.equal(value[2], "Март");
+ test.equal(value[3], "Апрель");
+ test.equal(value[4], "Май");
+ test.equal(value[5], "Июнь");
+ test.equal(value[6], "Июль");
+ test.equal(value[7], "Август");
+ test.equal(value[8], "Сентябрь");
+ test.equal(value[9], "Октябрь");
+ test.equal(value[10], "Ноябрь");
+ test.equal(value[11], "Декабрь");
+
+ var fmt = new DateFmt({locale:"ky-KG", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+
+ test.equal(value[0], "Янв");
+ test.equal(value[1], "Фев");
+ test.equal(value[2], "Мар");
+ test.equal(value[3], "Апр");
+ test.equal(value[4], "Май");
+ test.equal(value[5], "Июн");
+ test.equal(value[6], "Июл");
+ test.equal(value[7], "Авг");
+ test.equal(value[8], "Сен");
+ test.equal(value[9], "Окт");
+ test.equal(value[10], "Ноя");
+ test.equal(value[11], "Дек");
+ test.done();
+ },
+ testMonthTranslate_ca_AD: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: M
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"ca-AD", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "gener");
+ test.equal(value[1], "febrer");
+ test.equal(value[2], "març");
+ test.equal(value[3], "abril");
+ test.equal(value[4], "maig");
+ test.equal(value[5], "juny");
+ test.equal(value[6], "juliol");
+ test.equal(value[7], "agost");
+ test.equal(value[8], "setembre");
+ test.equal(value[9], "octubre");
+ test.equal(value[10], "novembre");
+ test.equal(value[11], "desembre");
+
+ var fmt = new DateFmt({locale:"ca-AD", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "gen.");
+ test.equal(value[1], "febr.");
+ test.equal(value[2], "març");
+ test.equal(value[3], "abr.");
+ test.equal(value[4], "maig");
+ test.equal(value[5], "juny");
+ test.equal(value[6], "jul.");
+ test.equal(value[7], "ag.");
+ test.equal(value[8], "set.");
+ test.equal(value[9], "oct.");
+ test.equal(value[10], "nov.");
+ test.equal(value[11], "des.");
+
+ test.done();
+ },
+ testMonthTranslate_ca_ES: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: M
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"ca-ES", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "gener");
+ test.equal(value[1], "febrer");
+ test.equal(value[2], "març");
+ test.equal(value[3], "abril");
+ test.equal(value[4], "maig");
+ test.equal(value[5], "juny");
+ test.equal(value[6], "juliol");
+ test.equal(value[7], "agost");
+ test.equal(value[8], "setembre");
+ test.equal(value[9], "octubre");
+ test.equal(value[10], "novembre");
+ test.equal(value[11], "desembre");
+
+ var fmt = new DateFmt({locale:"ca-AD", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+
+ test.equal(value[0], "gen.");
+ test.equal(value[1], "febr.");
+ test.equal(value[2], "març");
+ test.equal(value[3], "abr.");
+ test.equal(value[4], "maig");
+ test.equal(value[5], "juny");
+ test.equal(value[6], "jul.");
+ test.equal(value[7], "ag.");
+ test.equal(value[8], "set.");
+ test.equal(value[9], "oct.");
+ test.equal(value[10], "nov.");
+ test.equal(value[11], "des.");
+ test.done();
+ },
+ testMonthTranslate_hy_AM: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: MM
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"hy-AM", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "հունվար");
+ test.equal(value[1], "փետրվար");
+ test.equal(value[2], "մարտ");
+ test.equal(value[3], "ապրիլ");
+ test.equal(value[4], "մայիս");
+ test.equal(value[5], "հունիս");
+ test.equal(value[6], "հուլիս");
+ test.equal(value[7], "օգոստոս");
+ test.equal(value[8], "սեպտեմբեր");
+ test.equal(value[9], "հոկտեմբեր");
+ test.equal(value[10], "նոյեմբեր");
+ test.equal(value[11], "դեկտեմբեր");
+
+ var fmt = new DateFmt({locale:"hy-AM", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "հնվ");
+ test.equal(value[1], "փտվ");
+ test.equal(value[2], "մրտ");
+ test.equal(value[3], "ապր");
+ test.equal(value[4], "մյս");
+ test.equal(value[5], "հնս");
+ test.equal(value[6], "հլս");
+ test.equal(value[7], "օգս");
+ test.equal(value[8], "սեպ");
+ test.equal(value[9], "հոկ");
+ test.equal(value[10], "նոյ");
+ test.equal(value[11], "դեկ");
+ test.done();
+ },
+ testMonthTranslate_gl_ES: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: MM
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"gl-ES", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "Xaneiro");
+ test.equal(value[1], "Febreiro");
+ test.equal(value[2], "Marzo");
+ test.equal(value[3], "Abril");
+ test.equal(value[4], "Maio");
+ test.equal(value[5], "Xuño");
+ test.equal(value[6], "Xullo");
+ test.equal(value[7], "Agosto");
+ test.equal(value[8], "Setembro");
+ test.equal(value[9], "Outubro");
+ test.equal(value[10], "Novembro");
+ test.equal(value[11], "Decembro");
+
+ var fmt = new DateFmt({locale:"gl-ES", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "Xan.");
+ test.equal(value[1], "Feb.");
+ test.equal(value[2], "Mar.");
+ test.equal(value[3], "Abr.");
+ test.equal(value[4], "Maio");
+ test.equal(value[5], "Xuño");
+ test.equal(value[6], "Xul.");
+ test.equal(value[7], "Ago.");
+ test.equal(value[8], "Set.");
+ test.equal(value[9], "Out.");
+ test.equal(value[10], "Nov.");
+ test.equal(value[11], "Dec.");
+ test.done();
+ },
testMonthTranslate_eu_ES: function(test) {
test.expect(24);
@@ -7343,10 +7629,10 @@ module.exports.testmonthtranslation = {
test.equal(value[11], "abendua");
var fmt = new DateFmt({locale:"eu-ES", date:"m", length: "medium", useNative:false, timezone:"local"})
+
for (i=0; i < 12; i++) {
value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
}
-
test.equal(value[0], "urt.");
test.equal(value[1], "ots.");
test.equal(value[2], "mar.");
@@ -7359,6 +7645,50 @@ module.exports.testmonthtranslation = {
test.equal(value[9], "urr.");
test.equal(value[10], "aza.");
test.equal(value[11], "abe.");
+ test.done();
+ },
+ testMonthTranslate_ne_NP: function(test) {
+ test.expect(24);
+
+ // full, long: MMMM
+ // medium: MMM
+ // short: M
+
+ var value = [], i;
+ var fmt = new DateFmt({locale:"ne-NP", date:"m", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+ test.equal(value[0], "जनवरी");
+ test.equal(value[1], "फेब्रुअरी");
+ test.equal(value[2], "मार्च");
+ test.equal(value[3], "अप्रिल");
+ test.equal(value[4], "मे");
+ test.equal(value[5], "जुन");
+ test.equal(value[6], "जुलाई");
+ test.equal(value[7], "अगस्ट");
+ test.equal(value[8], "सेप्टेम्बर");
+ test.equal(value[9], "अक्टोबर");
+ test.equal(value[10], "नोभेम्बर");
+ test.equal(value[11], "डिसेम्बर");
+
+ var fmt = new DateFmt({locale:"ne-NP", date:"m", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 12; i++) {
+ value[i] = fmt.format(DateFactory({month:i+1, type:"gregorian"}));
+ }
+
+ test.equal(value[0], "जनवरी");
+ test.equal(value[1], "फेब्रुअरी");
+ test.equal(value[2], "मार्च");
+ test.equal(value[3], "अप्रिल");
+ test.equal(value[4], "मे");
+ test.equal(value[5], "जुन");
+ test.equal(value[6], "जुलाई");
+ test.equal(value[7], "अगस्ट");
+ test.equal(value[8], "सेप्टेम्बर");
+ test.equal(value[9], "अक्टोबर");
+ test.equal(value[10], "नोभेम्बर");
+ test.equal(value[11], "डिसेम्बर");
test.done();
},
diff --git a/js/test/date/testSuite.html b/js/test/date/testSuite.html
index 47ed405d85..3aa3e5948c 100644
--- a/js/test/date/testSuite.html
+++ b/js/test/date/testSuite.html
@@ -48,10 +48,12 @@
+
+
@@ -70,11 +72,13 @@
+
+
@@ -84,6 +88,8 @@
+
+
@@ -93,6 +99,7 @@
+
diff --git a/js/test/date/testSuiteFiles.js b/js/test/date/testSuiteFiles.js
index 6fc6f4e9b9..09539e5700 100644
--- a/js/test/date/testSuiteFiles.js
+++ b/js/test/date/testSuiteFiles.js
@@ -1,7 +1,7 @@
/*
* testSuiteFiles.js - list the test files in this directory
*
- * Copyright © 2017-2018,2020 JEDLSoft
+ * Copyright © 2017-2018, 2020 JEDLSoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,10 +36,12 @@ module.exports.files = [
"testdatefmt_ar_SA.js",
"testdatefmt_as_IN.js",
"testdatefmt_az_Latn_AZ.js",
+ "testdatefmt_be_BY.js",
"testdatefmt_bg.js",
"testdatefmt_bn_IN.js",
"testdatefmt_bs_Cyrl_BA.js",
"testdatefmt_bs_Latn_BA.js",
+ "testdatefmt_ca.js",
"testdatefmt_cop_EG.js",
"testdatefmt_cs_CZ.js",
"testdatefmt_da_DK.js",
@@ -58,11 +60,13 @@ module.exports.files = [
"testdatefmt_fr_CA.js",
"testdatefmt_fr_FR.js",
"testdatefmt_ga_IE.js",
+ "testdatefmt_gl_ES.js",
"testdatefmt_gu_IN.js",
"testdatefmt_ha_Latn_NG.js",
"testdatefmt_he_IL.js",
"testdatefmt_hi_IN.js",
"testdatefmt_hr_HR.js",
+ "testdatefmt_hy_AM.js",
"testdatefmt_id_ID.js",
"testdatefmt_it_IT.js",
"testdatefmt_ja_JP.js",
@@ -72,6 +76,8 @@ module.exports.files = [
"testdatefmt_kn_IN.js",
"testdatefmt_ko_KR.js",
"testdatefmt_ku_Arab_IQ.js",
+ "testdatefmt_ky_KG.js",
+ "testdatefmt_lo_LA.js",
"testdatefmt_lt_LT.js",
"testdatefmt_lv_LV.js",
"testdatefmt_mk_MK.js",
@@ -81,6 +87,7 @@ module.exports.files = [
"testdatefmt_ms_MY.js",
"testdatefmt_my_MM.js",
"testdatefmt_nb_NO.js",
+ "testdatefmt_ne_NP.js",
"testdatefmt_nl_NL.js",
"testdatefmt_or_IN.js",
"testdatefmt_pa_IN.js",
diff --git a/js/test/date/testWeekdayTranslation.js b/js/test/date/testWeekdayTranslation.js
index 00294d626b..fb4c9670f9 100644
--- a/js/test/date/testWeekdayTranslation.js
+++ b/js/test/date/testWeekdayTranslation.js
@@ -1,5 +1,5 @@
/*
- * testWeekdayTranslation.js
+ * testWeekdayTranslation.js - test the weekday's translation
*
* Copyright © 2019-2020, JEDLSoft
*
@@ -25,7 +25,6 @@ if (typeof(DateFmt) === "undefined") {
var DateFmt = require("../../lib/DateFmt.js");
}
-
module.exports.testWeekdayTranslation = {
setUp: function(callback) {
callback();
@@ -11224,6 +11223,499 @@ module.exports.testWeekdayTranslation = {
test.done();
},
+ testWeekdayTranslationFull_be_BY: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"be-BY", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "нядзеля");
+ test.equal(value[1], "панядзелак");
+ test.equal(value[2], "аўторак");
+ test.equal(value[3], "серада");
+ test.equal(value[4], "чацвер");
+ test.equal(value[5], "пятніца");
+ test.equal(value[6], "субота");
+ test.done();
+ },
+ testWeekdayTranslationLong_be_BY: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"be-BY", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "нд");
+ test.equal(value[1], "пн");
+ test.equal(value[2], "аў");
+ test.equal(value[3], "ср");
+ test.equal(value[4], "чц");
+ test.equal(value[5], "пт");
+ test.equal(value[6], "сб");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_be_BY: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"be-BY", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "нд");
+ test.equal(value[1], "пн");
+ test.equal(value[2], "аў");
+ test.equal(value[3], "ср");
+ test.equal(value[4], "чц");
+ test.equal(value[5], "пт");
+ test.equal(value[6], "сб");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_be_BY: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"be-BY", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "н");
+ test.equal(value[1], "п");
+ test.equal(value[2], "а");
+ test.equal(value[3], "с");
+ test.equal(value[4], "ч");
+ test.equal(value[5], "п");
+ test.equal(value[6], "с");
+ test.done();
+ },
+ testWeekdayTranslationFull_lo_LA: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"lo-LA", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "ວັນອາທິດ");
+ test.equal(value[1], "ວັນຈັນ");
+ test.equal(value[2], "ວັນອັງຄານ");
+ test.equal(value[3], "ວັນພຸດ");
+ test.equal(value[4], "ວັນພະຫັດ");
+ test.equal(value[5], "ວັນສຸກ");
+ test.equal(value[6], "ວັນເສົາ");
+ test.done();
+ },
+ testWeekdayTranslationLong_lo_LA: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"lo-LA", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "ອາທິດ");
+ test.equal(value[1], "ຈັນ");
+ test.equal(value[2], "ອັງຄານ");
+ test.equal(value[3], "ພຸດ");
+ test.equal(value[4], "ພະຫັດ");
+ test.equal(value[5], "ສຸກ");
+ test.equal(value[6], "ເສົາ");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_lo_LA: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"lo-LA", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "ອາ.");
+ test.equal(value[1], "ຈ.");
+ test.equal(value[2], "ອ.");
+ test.equal(value[3], "ພ.");
+ test.equal(value[4], "ພຫ.");
+ test.equal(value[5], "ສຸ.");
+ test.equal(value[6], "ສ.");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_lo_LA: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"lo-LA", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "ອາ");
+ test.equal(value[1], "ຈ");
+ test.equal(value[2], "ອ");
+ test.equal(value[3], "ພ");
+ test.equal(value[4], "ພຫ");
+ test.equal(value[5], "ສຸ");
+ test.equal(value[6], "ສ");
+
+ test.done();
+ },
+ testWeekdayTranslationFull_ky_KG: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ky-KG", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "жекшемби");
+ test.equal(value[1], "дүйшөмбү");
+ test.equal(value[2], "шейшемби");
+ test.equal(value[3], "шаршемби");
+ test.equal(value[4], "бейшемби");
+ test.equal(value[5], "жума");
+ test.equal(value[6], "ишемби");
+ test.done();
+ },
+ testWeekdayTranslationLong_ky_KG: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ky-KG", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "жек.");
+ test.equal(value[1], "дүй.");
+ test.equal(value[2], "шейш.");
+ test.equal(value[3], "шарш.");
+ test.equal(value[4], "бейш.");
+ test.equal(value[5], "жума");
+ test.equal(value[6], "ишм.");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_ky_KG: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ky-KG", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "жш.");
+ test.equal(value[1], "дш.");
+ test.equal(value[2], "шш.");
+ test.equal(value[3], "шр.");
+ test.equal(value[4], "бш.");
+ test.equal(value[5], "жм.");
+ test.equal(value[6], "иш.");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_ky_KG: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ky-KG", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "Ж");
+ test.equal(value[1], "Д");
+ test.equal(value[2], "Ш");
+ test.equal(value[3], "Ш");
+ test.equal(value[4], "Б");
+ test.equal(value[5], "Ж");
+ test.equal(value[6], "И");
+
+ test.done();
+ },
+ testWeekdayTranslationFull_ca_AD: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-AD", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "diumenge");
+ test.equal(value[1], "dilluns");
+ test.equal(value[2], "dimarts");
+ test.equal(value[3], "dimecres");
+ test.equal(value[4], "dijous");
+ test.equal(value[5], "divendres");
+ test.equal(value[6], "dissabte");
+ test.done();
+ },
+ testWeekdayTranslationLong_ca_AD: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-AD", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "dg.");
+ test.equal(value[1], "dl.");
+ test.equal(value[2], "dt.");
+ test.equal(value[3], "dc.");
+ test.equal(value[4], "dj.");
+ test.equal(value[5], "dv.");
+ test.equal(value[6], "ds.");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_ca_AD: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-AD", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "dg.");
+ test.equal(value[1], "dl.");
+ test.equal(value[2], "dt.");
+ test.equal(value[3], "dc.");
+ test.equal(value[4], "dj.");
+ test.equal(value[5], "dv.");
+ test.equal(value[6], "ds.");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_ca_AD: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-AD", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "dg");
+ test.equal(value[1], "dl");
+ test.equal(value[2], "dt");
+ test.equal(value[3], "dc");
+ test.equal(value[4], "dj");
+ test.equal(value[5], "dv");
+ test.equal(value[6], "ds");
+
+ test.done();
+ },
+ testWeekdayTranslationFull_ca_ES: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-ES", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "diumenge");
+ test.equal(value[1], "dilluns");
+ test.equal(value[2], "dimarts");
+ test.equal(value[3], "dimecres");
+ test.equal(value[4], "dijous");
+ test.equal(value[5], "divendres");
+ test.equal(value[6], "dissabte");
+ test.done();
+ },
+ testWeekdayTranslationLong_ca_ES: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-ES", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "dg.");
+ test.equal(value[1], "dl.");
+ test.equal(value[2], "dt.");
+ test.equal(value[3], "dc.");
+ test.equal(value[4], "dj.");
+ test.equal(value[5], "dv.");
+ test.equal(value[6], "ds.");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_ca_ES: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-ES", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "dg.");
+ test.equal(value[1], "dl.");
+ test.equal(value[2], "dt.");
+ test.equal(value[3], "dc.");
+ test.equal(value[4], "dj.");
+ test.equal(value[5], "dv.");
+ test.equal(value[6], "ds.");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_ca_ES: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ca-ES", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "dg");
+ test.equal(value[1], "dl");
+ test.equal(value[2], "dt");
+ test.equal(value[3], "dc");
+ test.equal(value[4], "dj");
+ test.equal(value[5], "dv");
+ test.equal(value[6], "ds");
+ test.done();
+ },
+ testWeekdayTranslationFull_hy_AM: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"hy-AM", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "կիրակի");
+ test.equal(value[1], "երկուշաբթի");
+ test.equal(value[2], "երեքշաբթի");
+ test.equal(value[3], "չորեքշաբթի");
+ test.equal(value[4], "հինգշաբթի");
+ test.equal(value[5], "ուրբաթ");
+ test.equal(value[6], "շաբաթ");
+ test.done();
+ },
+ testWeekdayTranslationLong_hy_AM: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"hy-AM", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "կիր");
+ test.equal(value[1], "երկ");
+ test.equal(value[2], "երք");
+ test.equal(value[3], "չրք");
+ test.equal(value[4], "հնգ");
+ test.equal(value[5], "ուր");
+ test.equal(value[6], "շբթ");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_hy_AM: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"hy-AM", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "կր");
+ test.equal(value[1], "եկ");
+ test.equal(value[2], "եք");
+ test.equal(value[3], "չք");
+ test.equal(value[4], "հգ");
+ test.equal(value[5], "ու");
+ test.equal(value[6], "շբ");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_hy_AM: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"hy-AM", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "Կ");
+ test.equal(value[1], "Ե");
+ test.equal(value[2], "Ե");
+ test.equal(value[3], "Չ");
+ test.equal(value[4], "Հ");
+ test.equal(value[5], "Ո");
+ test.equal(value[6], "Շ");
+ test.done();
+ },
+ testWeekdayTranslationFull_gl_ES: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"gl-ES", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "Domingo");
+ test.equal(value[1], "Luns");
+ test.equal(value[2], "Martes");
+ test.equal(value[3], "Mércores");
+ test.equal(value[4], "Xoves");
+ test.equal(value[5], "Venres");
+ test.equal(value[6], "Sábado");
+ test.done();
+ },
+ testWeekdayTranslationLong_gl_ES: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"gl-ES", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "Dom.");
+ test.equal(value[1], "Luns");
+ test.equal(value[2], "Mar.");
+ test.equal(value[3], "Mér.");
+ test.equal(value[4], "Xov.");
+ test.equal(value[5], "Ven.");
+ test.equal(value[6], "Sáb.");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_gl_ES: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"gl-ES", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "Do");
+ test.equal(value[1], "Lu");
+ test.equal(value[2], "Ma");
+ test.equal(value[3], "Mé");
+ test.equal(value[4], "Xo");
+ test.equal(value[5], "Ve");
+ test.equal(value[6], "Sá");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_gl_ES: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"gl-ES", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "D");
+ test.equal(value[1], "L");
+ test.equal(value[2], "M");
+ test.equal(value[3], "M");
+ test.equal(value[4], "X");
+ test.equal(value[5], "V");
+ test.equal(value[6], "S");
+ test.done();
+ },
testWeekdayTranslationFull_eu_ES: function(test) {
// full -> wide
test.expect(7);
@@ -11292,6 +11784,76 @@ module.exports.testWeekdayTranslation = {
test.equal(value[4], "O");
test.equal(value[5], "O");
test.equal(value[6], "L");
+ test.done();
+ },
+ testWeekdayTranslationFull_ne_NP: function(test) {
+ // full -> wide
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ne-NP", date:"w", length: "full", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "आइतबार");
+ test.equal(value[1], "सोमबार");
+ test.equal(value[2], "मङ्गलबार");
+ test.equal(value[3], "बुधबार");
+ test.equal(value[4], "बिहिबार");
+ test.equal(value[5], "शुक्रबार");
+ test.equal(value[6], "शनिबार");
+ test.done();
+ },
+ testWeekdayTranslationLong_ne_NP: function(test) {
+ // long -> abbreviate
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ne-NP", date:"w", length: "long", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "आइत");
+ test.equal(value[1], "सोम");
+ test.equal(value[2], "मङ्गल");
+ test.equal(value[3], "बुध");
+ test.equal(value[4], "बिहि");
+ test.equal(value[5], "शुक्र");
+ test.equal(value[6], "शनि");
+
+ test.done();
+ },
+ testWeekdayTranslationMedium_ne_NP: function(test) {
+ // medium -> short
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ne-NP", date:"w", length: "medium", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "आइत");
+ test.equal(value[1], "सोम");
+ test.equal(value[2], "मङ्गल");
+ test.equal(value[3], "बुध");
+ test.equal(value[4], "बिहि");
+ test.equal(value[5], "शुक्र");
+ test.equal(value[6], "शनि");
+
+ test.done();
+ },
+ testWeekdayTranslationShort_ne_NP: function(test) {
+ // short: narrow
+ test.expect(7);
+ var fmt, value = [], i;
+ fmt = new DateFmt({locale:"ne-NP", date:"w", length: "short", useNative:false, timezone:"local"})
+ for (i=0; i < 7; i++) {
+ value[i] = fmt.format(DateFactory({year: 2015, month: 8, day:i+2, type:"gregorian"}));
+ }
+ test.equal(value[0], "आ");
+ test.equal(value[1], "सो");
+ test.equal(value[2], "म");
+ test.equal(value[3], "बु");
+ test.equal(value[4], "बि");
+ test.equal(value[5], "शु");
+ test.equal(value[6], "श");
test.done();
},
diff --git a/js/test/date/testcalendar.js b/js/test/date/testcalendar.js
index 299cb90ea7..4d0fce8eb2 100644
--- a/js/test/date/testcalendar.js
+++ b/js/test/date/testcalendar.js
@@ -23,17 +23,18 @@ if (typeof(LocaleInfo) === "undefined") {
module.exports.testcalendar = {
testDefaultCalendar_GregorianCaseAll: function(test) {
- test.expect(195);
+ test.expect(203);
+
var localeList = ["ar-AE","ar-BH","ar-DJ","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-MR",
- "ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","as-IN","az-Latn-AZ","bg-BG","bn-IN","bs-Latn-BA,bs-Latn-ME",
- "cs-CZ","da-DK","de-AT","de-CH","de-DE","de-LU","et-EE","el-CY","el-GR","en-AM","en-AU","en-AZ","en-CA","en-GB","en-GH",
+ "ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","as-IN","az-Latn-AZ","be-BY","bg-BG","bn-IN","bs-Latn-BA,bs-Latn-ME",
+ "ca-AD", "ca-ES", "cs-CZ","da-DK","de-AT","de-CH","de-DE","de-LU","et-EE","el-CY","el-GR","en-AM","en-AU","en-AZ","en-CA","en-GB","en-GH",
"en-GM","en-HK","en-IE","en-IN","en-IS","en-JP","en-KE","en-KR","en-LK","en-LR","en-MM","en-MW","en-MY","en-NG","en-NZ",
"en-PH","en-PK","en-PR","en-RW","en-SD","en-SG","en-SL","en-TW","en-TZ","en-UG","en-US","en-ZA","en-ZM","es-AR","es-BO",
"es-CL","es-CO","es-CR","es-DO","es-EC","es-ES","es-GQ","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PH","es-PR",
"es-PY","es-SV","es-US","es-UY","es-VE","eu-ES","fi-FI","fr-BE","fr-BF","fr-BJ","fr-CA","fr-CD","fr-CF","fr-CG","fr-CH","fr-CI",
- "fr-CM","fr-GQ","fr-DJ","fr-DZ","fr-FR","fr-GA","fr-GN","fr-LB","fr-LU","fr-ML","fr-RW","fr-SN","fr-TG","ga-IE","gu-IN",
- "he-IL","hi-IN","hi-SG","hr-HR","hr-ME","hu-HU","id-ID","is-IS","it-CH","it-IT","ja-JP","ka-GE","kk-Cyrl-KZ","km-KH","kn-IN",
- "ko-KR","ku-Arab-IQ","lt-LT","lv-LV","mk-MK","ml-IN","mn-Cyrl-MN","mr-IN","ms-MY","ms-SG","my-MM","nb-NO","nl-BE","nl-NL","pa-IN",
+ "fr-CM","fr-GQ","fr-DJ","fr-DZ","fr-FR","fr-GA","fr-GN","fr-LB","fr-LU","fr-ML","fr-RW","fr-SN","fr-TG","ga-IE","gl-ES","gu-IN",
+ "he-IL","hi-IN","hi-SG","hr-HR","hr-ME","hu-HU","hy-AM","id-ID","is-IS","it-CH","it-IT","ja-JP","ka-GE","kk-Cyrl-KZ","km-KH","kn-IN",
+ "ko-KR","ku-Arab-IQ","ky-KG","lo-LA","lt-LT","lv-LV","mk-MK","ml-IN","mn-Cyrl-MN","mr-IN","ms-MY","ms-SG","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","pa-IN",
"pa-PK","pl-PL","pt-AO","pt-BR","pt-GQ","pt-CV","pt-PT","ro-RO","ru-BY","ru-GE","ru-KG","ru-KZ","ru-RU","ru-UA","si-LK",
"sk-SK","sl-SI","sq-AL","sq-ME","sr-Latn-ME","sr-Latn-RS","sv-FI","sv-SE","sw-KE","ta-IN","ta-SG","te-IN","tr-AM","tr-AZ",
"tr-CY","tr-TR","uk-UA","ur-IN","ur-PK","uz-Cyrl-UZ","uz-Latn-UZ","vi-VN","zh-Hans-CN","zh-Hans-SG","zh-Hant-HK",
diff --git a/js/test/date/testclock.js b/js/test/date/testclock.js
index a15cdfaa4b..3dbce967ec 100644
--- a/js/test/date/testclock.js
+++ b/js/test/date/testclock.js
@@ -1,4 +1,4 @@
- /*
+/*
* testclock.js - test the 12/24 hour support amongst various locales
*
* Copyright © 2019-2020, JEDLSoft
@@ -1775,10 +1775,76 @@ module.exports.testclock = {
test.done();
},
+ testClock_be_BY: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("be-BY");
+ test.ok(info !== null);
+
+ test.equal(info.getClock(), 24);
+
+ test.done();
+ },
+ testClock_lo_LA: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("lo-LA");
+ test.ok(info !== null);
+
+ test.equal(info.getClock(), 24);
+
+ test.done();
+ },
+ testClock_ky_KG: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ky-KG");
+ test.ok(info !== null);
+
+ test.equal(info.getClock(), 24);
+
+ test.done();
+ },
+ testClock_ca_AD: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ca-AD");
+ test.ok(info !== null);
+
+ test.equal(info.getClock(), 24);
+
+ test.done();
+ },
+ testClock_ca_ES: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ca-ES");
+ test.ok(info !== null);
+
+ test.equal(info.getClock(), 24);
+ test.done();
+ },
+ testClock_hy_AM: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("hy-AM");
+ test.ok(info !== null);
+
+ test.equal(info.getClock(), 24);
+ test.done();
+ },
+ testClock_gl_ES: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("gl-ES");
+ test.ok(info !== null);
+ test.equal(info.getClock(), 24);
+ test.done();
+ },
testClock_eu_ES: function(test) {
test.expect(2);
var info = new LocaleInfo("eu-ES");
test.ok(info !== null);
+ test.equal(info.getClock(), 24);
+ test.done();
+ },
+ testClock_ne_NP: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ne-NP");
+ test.ok(info !== null);
test.equal(info.getClock(), 24);
diff --git a/js/test/date/testdatefmt_be_BY.js b/js/test/date/testdatefmt_be_BY.js
new file mode 100644
index 0000000000..b85b836d6e
--- /dev/null
+++ b/js/test/date/testdatefmt_be_BY.js
@@ -0,0 +1,1788 @@
+/*
+ * testdatefmt_be_BY.js - test the date formatter object in Belarus
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_be_BY = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateFmtConstructorEmpty_be_BY: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "be-BY"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29.09.11");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29.09.2011");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 верасня 2011 г.");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 верасня 2011 г.');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '01:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 верасня 2011 г. у 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 верасня 2011 г. у 13:45');
+ test.done();
+ },
+
+
+ testDateFmtTemplateCalendar_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11');
+ test.done();
+ },
+
+ testDateFmtTypeTime_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11, 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "ве");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'в');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '09.11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ч, 29.09');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ч, 29.09.11');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'чц, 29 верасня');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "верасень");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 верасня');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'верасень 2011 г.');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 верасня 2011 г.');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'чацвер, 29 верасня');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'чацвер, 29 верасня 2011 г.');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ time: "hmz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +03");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ time: "hmaz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +03");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ time: "hmsz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +03");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +03");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +03");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +03");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +03");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +03");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "be-BY",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Minsk"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +03");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "праз 30 секунд");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "30 секунд таму");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "праз 10 хвілін");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '10 хвілін таму');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'праз 4 гадзіны');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 гадзіны таму');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'праз 4 дні');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 дні таму');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'праз 9 тыдняў');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 тыдняў таму');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'праз 16 месяцаў');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 месяцаў таму');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'праз 14 гадоў');
+ test.done();
+ },
+testDateFmtFormatRelativeYearsBefore_be_BY: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "be-BY",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "be-BY",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '21 год таму');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatefmt_ca.js b/js/test/date/testdatefmt_ca.js
new file mode 100644
index 0000000000..e960d35d8c
--- /dev/null
+++ b/js/test/date/testdatefmt_ca.js
@@ -0,0 +1,3536 @@
+/*
+ * testdatefmt_ca.js - test the date formatter object in Catalan
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_ca = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+ //// ca-AD //////
+ testDateFmtConstructorEmpty_ca_AD: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "ca-AD"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29/9/11");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 de set. 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 de setembre de 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '1:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de set. 2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011 a les 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011 a les 13:45');
+ test.done();
+ },
+
+ testDateFmtTemplateCalendar_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11');
+ test.done();
+ },
+
+ testDateFmtTypeTime_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "ST");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'd');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '9/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dj, 29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dj, 29/9/11');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dj., 29 de setembre');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "setembre");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dijous, 29 de setembre');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dijous, 29 de setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ time: "hmz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ time: "hmaz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ time: "hmsz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-AD",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Andorra"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CET");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "d’aquí a 30 segons");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "fa 30 segons");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "d’aquí a 10 minuts");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 10 minuts');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 4 hores');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 4 hores');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 4 dies');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 4 dies');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 9 setmanes');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 9 setmanes');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 16 mesos');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 14 mesos');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 14 anys');
+ test.done();
+ },
+ testDateFmtFormatRelativeYearsBefore_ca_AD: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-AD",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-AD",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 21 anys');
+ test.done();
+ },
+
+ //// ca-ES //////
+ testDateFmtConstructorEmpty_ca_ES: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "ca-ES"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29/9/11");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 de set. 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 de setembre de 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '1:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de set. 2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011 a les 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011 a les 13:45');
+ test.done();
+ },
+
+ testDateFmtTemplateCalendar_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTypeDate_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11');
+ test.done();
+ },
+
+ testDateFmtTypeTime_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "ST");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'd');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '9/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dj, 29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dj, 29/9/11');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dj., 29 de setembre');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "setembre");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dijous, 29 de setembre');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'dijous, 29 de setembre de 2011');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ time: "hmz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ time: "hmaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ time: "hmsz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ca-ES",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CET");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "d’aquí a 30 segons");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "fa 30 segons");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "d’aquí a 10 minuts");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 10 minuts');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 4 hores');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 4 hores');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 4 dies');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 4 dies');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 9 setmanes');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 9 setmanes');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 16 mesos');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 14 mesos');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'd’aquí a 14 anys');
+ test.done();
+ },
+ testDateFmtFormatRelativeYearsBefore_ca_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ca-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ca-ES",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'fa 21 anys');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatefmt_gl_ES.js b/js/test/date/testdatefmt_gl_ES.js
new file mode 100644
index 0000000000..b6a7874b69
--- /dev/null
+++ b/js/test/date/testdatefmt_gl_ES.js
@@ -0,0 +1,1788 @@
+/*
+ * testdatefmt_gl_ES.js - test the date formatter object in Galician-Spain
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_gl_ES = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateFmtConstructorEmpty_gl_ES: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "gl-ES"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29/09/11");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 de set. de 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 de setembro de 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembro de 2011');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '01:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45, 29/09/11');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45, 29 de set. de 2011');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45 do 29 de setembro de 2011');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45 do 29 de setembro de 2011');
+ test.done();
+ },
+
+
+ testDateFmtTemplateCalendar_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/09/11');
+ test.done();
+ },
+
+ testDateFmtTypeTime_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45, 29/09/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "Se");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 's');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/09');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '09/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/09/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'x., 29/09');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'x., 29/09/11');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'xov., 29 de setembro');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "Setembro");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembro');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'Setembro de 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 de setembro de 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'xoves, 29 de setembro');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'xoves, 29 de setembro de 2011');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ time: "hmz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ time: "hmaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ time: "hmsz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CEST");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "gl-ES",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Europe/Madrid"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 CET");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "en 30 segundos");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "hai 30 segundos");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "en 10 minutos");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'hai 10 minutos');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'en 4 horas');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'hai 4 horas');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'en 4 días');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'hai 4 días');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'en 9 semanas');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'hai 9 semanas');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'en 16 meses');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'hai 14 meses');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'en 14 anos');
+ test.done();
+ },
+testDateFmtFormatRelativeYearsBefore_gl_ES: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "gl-ES",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "gl-ES",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'hai 21 anos');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatefmt_hy_AM.js b/js/test/date/testdatefmt_hy_AM.js
new file mode 100644
index 0000000000..aea24e102b
--- /dev/null
+++ b/js/test/date/testdatefmt_hy_AM.js
@@ -0,0 +1,1788 @@
+/*
+ * testdatefmt_hy_AM.js - test the date formatter object in Armenian/Armenia
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_hy_AM = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateFmtConstructorEmpty_hy_AM: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "hy-AM"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29.09.11");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 սեպ, 2011 թ.");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 սեպտեմբերի, 2011 թ.");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 թ. սեպտեմբերի 29');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '01:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 սեպ, 2011 թ., 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 սեպտեմբերի, 2011 թ., 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 թ. սեպտեմբերի 29, 13:45');
+ test.done();
+ },
+
+
+ testDateFmtTemplateCalendar_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11');
+ test.done();
+ },
+
+ testDateFmtTypeTime_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11, 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "սե");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ս');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '09.11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09, Հ');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29.09.11, Հ');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 սեպտեմբերի, հնգ');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "սեպտեմբեր");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'սեպտեմբերի 29');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 թ. սեպտեմբեր');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 թ. սեպտեմբերի 29');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'սեպտեմբերի 29, հինգշաբթի');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 թ. սեպտեմբերի 29, հինգշաբթի');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ time: "hmz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +04/+05");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ time: "hmaz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +04/+05");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ time: "hmsz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +04/+05");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +04/+05");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +04/+05");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +04/+05");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +04/+05");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +04/+05");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "hy-AM",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Yerevan"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +04/+05");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "30 վայրկյանից");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "30 վայրկյան առաջ");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "10 րոպեից");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '10 րոպե առաջ');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 ժամից');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 ժամ առաջ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 օրից');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 օր առաջ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 շաբաթից');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 շաբաթ առաջ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '16 ամսից');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 ամիս առաջ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 տարուց');
+ test.done();
+ },
+testDateFmtFormatRelativeYearsBefore_hy_AM: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "hy-AM",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "hy-AM",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '21 տարի առաջ');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatefmt_ky_KG.js b/js/test/date/testdatefmt_ky_KG.js
new file mode 100644
index 0000000000..b54e071a7b
--- /dev/null
+++ b/js/test/date/testdatefmt_ky_KG.js
@@ -0,0 +1,1788 @@
+/*
+ * testdatefmt_ky_KG.js - test the date formatter object in Kyrgyz
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_ky_KG = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateFmtConstructorEmpty_ky_KG: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "ky-KG"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29/9/11");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-ж., 29-сен.");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-ж., 29-сентябрь");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., 29-сентябрь');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '01:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., 29-сен. 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., 29-сентябрь 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., 29-сентябрь 13:45');
+ test.done();
+ },
+
+
+ testDateFmtTemplateCalendar_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11');
+ test.done();
+ },
+
+ testDateFmtTypeTime_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "С");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'с');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '9/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9, Б');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/11, Б');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29-сентябрь, бейш.');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "Сентябрь");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29-сентябрь');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., Сентябрь');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., 29-сентябрь');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29-сентябрь, бейшемби');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011-ж., 29-сентябрь, бейшемби');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ time: "hmz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +06");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ time: "hmaz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +06");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ time: "hmsz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +06");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +06");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +06");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +06");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +06");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +06");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ky-KG",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Bishkek"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +06");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "30 секунддан кийин");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "30 секунд мурун");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "10 мүнөттөн кийин");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '10 мүнөт мурун');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 сааттан кийин');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 саат мурун');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 күндөн кийин');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 күн мурун');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 аптадан кийин');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 апта мурун');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '16 айдан кийин');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 ай мурун');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 жылдан кийин');
+ test.done();
+ },
+testDateFmtFormatRelativeYearsBefore_ky_KG: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ky-KG",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ky-KG",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '21 жыл мурун');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatefmt_lo_LA.js b/js/test/date/testdatefmt_lo_LA.js
new file mode 100644
index 0000000000..fd680821d1
--- /dev/null
+++ b/js/test/date/testdatefmt_lo_LA.js
@@ -0,0 +1,1787 @@
+/*
+ * testdatefmt_lo_LA.js - test the date formatter object in Lao
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_lo_LA = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateFmtConstructorEmpty_lo_LA: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "lo-LA"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29/9/2011");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 ກ.ຍ. 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleLong_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29 ກັນຍາ 2011");
+ test.done();
+ },
+
+ testDateFmtSimpleFull_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 ກັນຍາ 2011');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "short", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "medium", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", timelength: "long", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '1:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "short", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "medium", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 ກ.ຍ. 2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "long", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 ກັນຍາ 2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 ກັນຍາ 2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtTemplateCalendar_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", calendar: "julian", template: "yyyy-MM-dd"});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", calendar: "julian", template: "yyyy-MM-dd HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", clock: "12", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", clock: "12", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", clock: "24", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", clock: "24", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", template: "hh:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", template: "KK:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", template: "HH:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", template: "kk:mm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "date"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/2011');
+ test.done();
+ },
+
+ testDateFmtTypeTime_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "datetime"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/2011, 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "9");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "n"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ກ');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '9/2011');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29/9/2011');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ພຫ ທີ 29/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ພຫ ທີ 29/9/2011');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", date: "wdm", length: "long"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ພະຫັດ ທີ 29 ກັນຍາ');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "y"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "ກັນຍາ");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "d"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "dm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 ກັນຍາ');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "my"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ກັນຍາ 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "dmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '29 ກັນຍາ 2011');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "wdm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ວັນພະຫັດ ທີ 29 ກັນຍາ');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full", date: "wdmy"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'ວັນພະຫັດ ທີ 29 ກັນຍາ 2011');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ time: "hmz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +07");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ time: "hmaz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +07");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ time: "hmsz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +07");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +07");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "s"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "m"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "h"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "ms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "hm"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "hms"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "hma"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +07");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +07");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", type: "time", length: "full", time: "hmsa"});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +07");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +07");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "lo-LA",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Vientiane"
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +07");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "ໃນອີກ 30 ວິນາທີ");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "30 ວິນາທີກ່ອນ");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), "ໃນອີກ 10 ນາທີ");
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '10 ນາທີກ່ອນ');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'ໃນອີກ 4 ຊົ່ວໂມງ');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 ຊົ່ວໂມງກ່ອນ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'ໃນອີກ 4 ມື້');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 ມື້ກ່ອນ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'ໃນອີກ 9 ອາທິດ');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 ອາທິດກ່ອນ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'ໃນອີກ 16 ເດືອນ');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 ເດືອນກ່ອນ');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), 'ໃນອີກ 14 ປີ');
+ test.done();
+ },
+testDateFmtFormatRelativeYearsBefore_lo_LA: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "lo-LA",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "lo-LA",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '21 ປີກ່ອນ');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatefmt_ne_NP.js b/js/test/date/testdatefmt_ne_NP.js
new file mode 100644
index 0000000000..c1bd354c61
--- /dev/null
+++ b/js/test/date/testdatefmt_ne_NP.js
@@ -0,0 +1,1796 @@
+/*
+ * testdatefmt_ne_NP.js - test the date formatter object in Nepali-Nepal
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(JulianDate) === "undefined") {
+ var JulianDate = require("../../lib/JulianDate.js");
+}
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateFmt) === "undefined") {
+ var DateFmt = require("../../lib/DateFmt.js");
+}
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmt_ne_NP = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateFmtConstructorEmpty_ne_NP: function(test) {
+ test.expect(1);
+ var fmt = new DateFmt({locale: "ne-NP"});
+
+ test.ok(fmt !== null);
+ test.done();
+ },
+
+ testDateFmtSimpleShort_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11/9/29");
+ test.done();
+ },
+
+ testDateFmtSimpleMedium_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29');
+ test.done();
+ },
+
+ testDateFmtSimpleLong_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29');
+ test.done();
+ },
+
+ testDateFmtSimpleFull_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeShort_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "short", type: "time", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeMedium_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "medium", type: "time", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeLong_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", timelength: "long", type: "time", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtSimpleTimeFull_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", type: "time", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 1,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '01:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleShort_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "short", type: "datetime", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '11/9/29, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleMedium_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "medium", type: "datetime", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29, 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleLong_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "long", type: "datetime", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29 13:45');
+ test.done();
+ },
+
+ testDateFmtDateTimeSimpleFull_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", type: "datetime", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29 13:45');
+ test.done();
+ },
+
+ testDateFmtTemplateCalendar_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", calendar: "julian", template: "yyyy-MM-dd", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new JulianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011-09-29");
+ test.done();
+ },
+
+ testDateFmtTemplateCalendarIncompatibleDateType_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", calendar: "julian", template: "yyyy-MM-dd HH:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ // convert automatically to a Julian calendar date
+ test.equal(fmt.format(date), "2011-09-16 13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12SwitchHH_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", clock: "12", template: "HH:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock12Switchkk_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", clock: "12", template: "kk:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24Switchhh_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", clock: "24", template: "hh:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateClock24SwitchKK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", clock: "24", template: "KK:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", template: "hh:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault12KK: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", template: "KK:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "01:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", template: "HH:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", template: "kk:mm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+
+ testDateFmtTypeDate_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "date", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '11/9/29');
+ test.done();
+ },
+
+ testDateFmtTypeTime_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '13:45');
+ test.done();
+ },
+
+ testDateFmtTypeDateTime_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "datetime", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '11/9/29, 13:45');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "y", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "11");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "m", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "9");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsN_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "n", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'स');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsD_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "d", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "dm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '9/29');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsMY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "my", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '11/9');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsDMY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "dmy", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '11/9/29');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "wdm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '9/29, बि');
+ test.done();
+ },
+
+ testDateFmtShortDateComponentsWDMY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "wdmy", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '11/9/29, बि');
+ test.done();
+ },
+
+ testDateFmtLongDateComponentsWDM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", date: "wdm", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'सेप्टेम्बर 29, बिहि');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "y", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "2011");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "m", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "सेप्टेम्बर");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsD_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "d", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "29");
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "dm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'सेप्टेम्बर 29');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsMY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "my", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsDMY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "dmy", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "wdm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), 'सेप्टेम्बर 29, बिहिबार');
+ test.done();
+ },
+
+ testDateFmtFullDateComponentsWDMY_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full", date: "wdmy", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), '2011 सेप्टेम्बर 29, बिहिबार');
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsS_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "s", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "m", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsH_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "h", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsMS_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "ms", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "hm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMS_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "hms", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMA_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "hma", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ time: "hmz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +0545");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMAZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ time: "hmaz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +0545");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSA_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", time: "hmsa", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ time: "hmsz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +0545");
+ test.done();
+ },
+
+ testDateFmtShortTimeComponentsHMSAZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ time: "hmsaz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +0545");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsS_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "s", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "m", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsH_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "h", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsMS_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "ms", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHM_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "hm", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMS_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "hms", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMA_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "hma", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ length: "full",
+ time: "hmz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +0545");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMAZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ length: "full",
+ time: "hmaz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45 +0545");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSA_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", type: "time", length: "full", time: "hmsa", useNative: false});
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +0545");
+ test.done();
+ },
+
+ testDateFmtFullTimeComponentsHMSAZ_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ length: "full",
+ time: "hmsaz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +0545");
+ test.done();
+ },
+
+ testDateFmtWithTimeZoneAndNoDST_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({
+ locale: "ne-NP",
+ type: "time",
+ length: "full",
+ time: "hmsz",
+ timezone: "Asia/Kathmandu",
+ useNative: false
+ });
+ test.ok(fmt !== null);
+
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 12,
+ day: 29,
+ hour: 13,
+ minute: 45,
+ second: 37,
+ millisecond: 0
+ });
+ test.equal(fmt.format(date), "13:45:37 +0545");
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinMinuteAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '30 सेकेन्डमा');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinMinuteBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 44,
+ second: 30,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '30 सेकेन्ड पहिले');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '10 मिनेटमा');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinHourBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '10 मिनेट पहिले');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 17,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 घण्टामा');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinDayBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 घण्टा पहिले');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinFortnightAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 दिनमा');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinFortnightBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 16,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '4 दिन पहिले');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinQuarterAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 11,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 हप्तामा');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinQuarterBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '9 हप्ता पहिले');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeWithinTwoYearsAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2013,
+ month: 1,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '16 महिनामा');
+ test.done();
+ },
+testDateFmtFormatRelativeWithinTwoYearsBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2010,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 महिना पहिले');
+ test.done();
+ },
+
+ testDateFmtFormatRelativeYearsAfter_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 2025,
+ month: 10,
+ day: 24,
+ hour: 15,
+ minute: 55,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '14 वर्षमा');
+ test.done();
+ },
+testDateFmtFormatRelativeYearsBefore_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new DateFmt({locale: "ne-NP", length: "full"});
+ test.ok(fmt !== null);
+
+ var reference = new GregorianDate({
+ locale: "ne-NP",
+ year: 2011,
+ month: 9,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var date = new GregorianDate({
+ locale: "ne-NP",
+ year: 1990,
+ month: 7,
+ day: 18,
+ hour: 9,
+ minute: 35,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.formatRelative(reference, date), '21 वर्ष अघि');
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/date/testdatetimefmt.js b/js/test/date/testdatetimefmt.js
index ba4aa2859b..18340614fe 100644
--- a/js/test/date/testdatetimefmt.js
+++ b/js/test/date/testdatetimefmt.js
@@ -5130,11 +5130,159 @@ module.exports.testdatetimeformat = {
test.done();
},
- testDateTimeFormat_eu_ES: function(test) {
+ testDateTimeFormat_be_BY: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
+ result1 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"be-BY", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE, d MMMM yyyy \'г\'.");
+ test.equal(result2, "EEE, d MMMM yyyy \'г\'.");
+ test.equal(result3, "EE, d.MM.yyyy");
+ test.equal(result4, "E, d.MM.yy");
+
+ result1 = new DateFmt({locale:"be-BY", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"be-BY", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE, d MMMM yyyy \'г\'. \'у\' HH:mm");
+ test.equal(result2, "E, d.MM.yy, HH:mm");
+
+ result1 = new DateFmt({locale:"be-BY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "HH:mm:ss z");
+
+ test.done();
+ },
+ testDateTimeFormat_lo_LA: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
+
+ result1 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"lo-LA", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE ທີ d MMMM yyyy");
+ test.equal(result2, "EEE ທີ d MMMM yyyy");
+ test.equal(result3, "EE ທີ d MMM yyyy");
+ test.equal(result4, "E ທີ d/M/yyyy");
+
+ result1 = new DateFmt({locale:"lo-LA", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"lo-LA", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE ທີ d MMMM yyyy, H:mm");
+ test.equal(result2, "E ທີ d/M/yyyy, H:mm");
+
+ result1 = new DateFmt({locale:"lo-LA", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "H:mm:ss z");
+ test.done();
+ },
+ testDateTimeFormat_ky_KG: function(test) {
test.expect(7);
var result1, result2, result3, result4;
+ result1 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"ky-KG", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "yyyy-\'ж\'., d-MMMM, EEEE");
+ test.equal(result2, "yyyy-\'ж\'., d-MMMM, EEE");
+ test.equal(result3, "yyyy-\'ж\'., d-MMM, EE");
+ test.equal(result4, "d/M/yy, E");
+
+ result1 = new DateFmt({locale:"ky-KG", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ky-KG", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "yyyy-\'ж\'., d-MMMM, EEEE HH:mm");
+ test.equal(result2, "d/M/yy, E HH:mm");
+
+ result1 = new DateFmt({locale:"ky-KG", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "HH:mm:ss z");
+
+ test.done();
+ },
+ testDateTimeFormat_ca_AD: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
+
+ result1 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"ca-AD", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE, d MMMM \'de\' yyyy");
+ test.equal(result2, "EEE, d MMMM \'de\' yyyy");
+ test.equal(result3, "EE, d MMM yyyy");
+ test.equal(result4, "E, d/M/yy");
+
+ result1 = new DateFmt({locale:"ca-AD", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ca-AD", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE, d MMMM \'de\' yyyy \'a\' \'les\' H:mm");
+ test.equal(result2, "E, d/M/yy H:mm");
+
+ result1 = new DateFmt({locale:"ca-AD", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "H:mm:ss z");
+
+ test.done();
+ },
+ testDateTimeFormat_ca_ES: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
+ result1 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"ca-ES", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE, d MMMM \'de\' yyyy");
+ test.equal(result2, "EEE, d MMMM \'de\' yyyy");
+ test.equal(result3, "EE, d MMM yyyy");
+ test.equal(result4, "E, d/M/yy");
+
+ result1 = new DateFmt({locale:"ca-ES", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ca-ES", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "EEEE, d MMMM \'de\' yyyy \'a\' \'les\' H:mm");
+ test.equal(result2, "E, d/M/yy H:mm");
+
+ result1 = new DateFmt({locale:"ca-ES", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "H:mm:ss z");
+ test.done();
+ },
+ testDateTimeFormat_hy_AM: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
+ result1 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"hy-AM", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "yyyy թ. MMMM d, EEEE");
+ test.equal(result2, "dd MMMM, yyyy թ., EEE");
+ test.equal(result3, "dd MMM, yyyy թ., EE");
+ test.equal(result4, "dd.MM.yy, E");
+
+ result1 = new DateFmt({locale:"hy-AM", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"hy-AM", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "yyyy թ. MMMM d, EEEE, HH:mm");
+ test.equal(result2, "dd.MM.yy, E, HH:mm");
+
+ result1 = new DateFmt({locale:"hy-AM", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "HH:mm:ss z");
+ test.done();
+ },
+ testDateTimeFormat_eu_ES: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
result1 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
result2 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
result3 = new DateFmt({locale:"eu-ES", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
@@ -5153,6 +5301,31 @@ module.exports.testdatetimeformat = {
result1 = new DateFmt({locale:"eu-ES", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
test.equal(result1, "HH:mm:ss (z)");
+ test.done();
+ },
+ testDateTimeFormat_ne_NP: function(test) {
+ test.expect(7);
+
+ var result1, result2, result3, result4;
+
+ result1 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template;
+ result3 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template;
+ result4 = new DateFmt({locale:"ne-NP", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "yyyy MMMM d, EEEE");
+ test.equal(result2, "yyyy MMMM d, EEE");
+ test.equal(result3, "yyyy MMM d, EE");
+ test.equal(result4, "yy/M/d, E");
+
+ result1 = new DateFmt({locale:"ne-NP", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template;
+ result2 = new DateFmt({locale:"ne-NP", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template;
+
+ test.equal(result1, "yyyy MMMM d, EEEE HH:mm");
+ test.equal(result2, "yy/M/d, E, HH:mm");
+
+ result1 = new DateFmt({locale:"ne-NP", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template;
+ test.equal(result1, "HH:mm:ss z");
test.done();
},
diff --git a/js/test/daterange/testSuite.html b/js/test/daterange/testSuite.html
index e24e31d670..413f869765 100644
--- a/js/test/daterange/testSuite.html
+++ b/js/test/daterange/testSuite.html
@@ -38,9 +38,11 @@
+
+
@@ -59,12 +61,14 @@
+
+
@@ -74,6 +78,8 @@
+
+
@@ -83,6 +89,7 @@
+
diff --git a/js/test/daterange/testSuiteFiles.js b/js/test/daterange/testSuiteFiles.js
index 0ee85cbfe1..900b320692 100644
--- a/js/test/daterange/testSuiteFiles.js
+++ b/js/test/daterange/testSuiteFiles.js
@@ -26,9 +26,11 @@ module.exports.files = [
"testdatefmtrange_ar_SA.js",
"testdatefmtrange_as_IN.js",
"testdatefmtrange_az_Latn_AZ.js",
+ "testdatefmtrange_be_BY.js",
"testdatefmtrange_bg_BG.js",
"testdatefmtrange_bn_IN.js",
"testdatefmtrange_bs_Latn_BA.js",
+ "testdatefmtrange_ca.js",
"testdatefmtrange_cs_CZ.js",
"testdatefmtrange_da_DK.js",
"testdatefmtrange_de_DE.js",
@@ -48,11 +50,13 @@ module.exports.files = [
"testdatefmtrange_fr_FR.js",
"testdatefmtrange_ga_IE.js",
"testdatefmtrange_gu_IN.js",
+ "testdatefmtrange_gl_ES.js",
"testdatefmtrange_ha_Latn_NG.js",
"testdatefmtrange_he_IL.js",
"testdatefmtrange_hi_IN.js",
"testdatefmtrange_hr_HR.js",
"testdatefmtrange_hu_HU.js",
+ "testdatefmtrange_hy_AM.js",
"testdatefmtrange_id_ID.js",
"testdatefmtrange_it_IT.js",
"testdatefmtrange_ja_JP.js",
@@ -62,6 +66,8 @@ module.exports.files = [
"testdatefmtrange_kn_IN.js",
"testdatefmtrange_ko_KR.js",
"testdatefmtrange_ku_Arab_IQ.js",
+ "testdatefmtrange_ky_KG.js",
+ "testdatefmtrange_lo_LA.js",
"testdatefmtrange_lt_LT.js",
"testdatefmtrange_lv_LV.js",
"testdatefmtrange_mk_MK.js",
@@ -71,6 +77,7 @@ module.exports.files = [
"testdatefmtrange_ms_MY.js",
"testdatefmtrange_my_MM.js",
"testdatefmtrange_nb_NO.js",
+ "testdatefmtrange_ne_NP.js",
"testdatefmtrange_nl_NL.js",
"testdatefmtrange_or_IN.js",
"testdatefmtrange_pa_IN.js",
diff --git a/js/test/daterange/testdatefmtrange_be_BY.js b/js/test/daterange/testdatefmtrange_be_BY.js
new file mode 100644
index 0000000000..53704e2832
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_be_BY.js
@@ -0,0 +1,692 @@
+/*
+ * testdatefmtrange_be_BY.js - test the date range formatter object Belarussian/Belarus
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_be_BY = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateRngFmtbeBYRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31.12.11, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31.12.2011, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 снежня 2011 г. у 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 снежня 2011 г. у 13:45 – 14:30");
+ test.done();
+ },
+
+ testDateRngFmtbeBYRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30.12.11, 13:45 – 31.12.11, 14:30");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30.12.2011, 13:45 – 31.12.2011, 14:30");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 снежня 2011 г. у 13:45 – 31 снежня 2011 г. у 14:30");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 снежня 2011 г. у 13:45 – 31 снежня 2011 г. у 14:30");
+ test.done();
+ },
+
+ testDateRngFmtbeBYRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31.12.11");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31.12.2011");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 снежня 2011 г.");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 снежня 2011 г.");
+ test.done();
+ },
+
+ testDateRngFmtbeBYRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20.11 – 31.12.11");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20.11 – 31.12.2011");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 лістапада – 31 снежня 2011 г.");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 лістапада – 31 снежня 2011 г.");
+ test.done();
+ },
+
+ testDateRngFmtbeBYRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20.11.11 – 31.01.12");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20.11.2011 – 31.01.2012");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 лістапада 2011 г. – 31 студзеня 2012 г.");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 лістапада 2011 г. – 31 студзеня 2012 г.");
+ test.done();
+ },
+
+ testDateRngFmtbeBYRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11.11 – 01.14");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11.2011 – 01.2014");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "лістапада 2011 г. – студзеня 2014 г.");
+ test.done();
+ },
+ testDateRngFmtbeBYRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "лістапада 2011 г. – студзеня 2014 г.");
+ test.done();
+ },
+ testDateRngFmtbeBYManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "be-BY", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/daterange/testdatefmtrange_ca.js b/js/test/daterange/testdatefmtrange_ca.js
new file mode 100644
index 0000000000..30f0aa0e93
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_ca.js
@@ -0,0 +1,1348 @@
+/*
+ * testdatefmtrange_ca.js - test the date range formatter object Catalan
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_ca = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+ //// ca-AD ////
+ testDateRngFmtcaADRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31/12/11 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtcaADRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 de des. 2011, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtcaADRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 de desembre de 2011 a les 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtcaADRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 de desembre de 2011 a les 13:45 – 14:30");
+ test.done();
+ },
+
+ testDateRngFmtcaADRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30/12/11 13:45 – 31/12/11 14:30");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 de des. 2011, 13:45 – 31 de des. 2011, 14:30");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 de desembre de 2011 a les 13:45 – 31 de desembre de 2011 a les 14:30");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 de desembre de 2011 a les 13:45 – 31 de desembre de 2011 a les 14:30");
+ test.done();
+ },
+
+ testDateRngFmtcaADRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtcaADRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de des. 2011");
+ test.done();
+ },
+ testDateRngFmtcaADRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de desembre de 2011");
+ test.done();
+ },
+ testDateRngFmtcaADRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de desembre de 2011");
+ test.done();
+ },
+
+ testDateRngFmtcaADRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de nov. – 31 de des. 2011");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre – 31 de desembre de 2011");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre – 31 de desembre de 2011");
+ test.done();
+ },
+
+ testDateRngFmtcaADRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11/11 – 31/1/12");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de nov. 2011 – 31 de gen. 2012");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre de 2011 – 31 de gener de 2012");
+ test.done();
+ },
+ testDateRngFmtcaADRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre de 2011 – 31 de gener de 2012");
+ test.done();
+ },
+
+ testDateRngFmtcaADRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11 – 1/14");
+ test.done();
+ },
+ testDateRngFmtcaADRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "de nov. 2011 – de gen. 2014");
+ test.done();
+ },
+ testDateRngFmtcaADRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "de novembre de 2011 – de gener de 2014");
+ test.done();
+ },
+ testDateRngFmtcaADRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "de novembre de 2011 – de gener de 2014");
+ test.done();
+ },
+ testDateRngFmtcaADManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ },
+ //// ca-ES ////
+ testDateRngFmtcaESRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-AD", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31/12/11 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtcaESRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 de des. 2011, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtcaESRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 de desembre de 2011 a les 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtcaESRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 de desembre de 2011 a les 13:45 – 14:30");
+ test.done();
+ },
+
+ testDateRngFmtcaESRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30/12/11 13:45 – 31/12/11 14:30");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 de des. 2011, 13:45 – 31 de des. 2011, 14:30");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 de desembre de 2011 a les 13:45 – 31 de desembre de 2011 a les 14:30");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 de desembre de 2011 a les 13:45 – 31 de desembre de 2011 a les 14:30");
+ test.done();
+ },
+
+ testDateRngFmtcaESRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtcaESRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de des. 2011");
+ test.done();
+ },
+ testDateRngFmtcaESRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de desembre de 2011");
+ test.done();
+ },
+ testDateRngFmtcaESRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de desembre de 2011");
+ test.done();
+ },
+
+ testDateRngFmtcaESRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de nov. – 31 de des. 2011");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre – 31 de desembre de 2011");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre – 31 de desembre de 2011");
+ test.done();
+ },
+
+ testDateRngFmtcaESRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11/11 – 31/1/12");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de nov. 2011 – 31 de gen. 2012");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre de 2011 – 31 de gener de 2012");
+ test.done();
+ },
+ testDateRngFmtcaESRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembre de 2011 – 31 de gener de 2012");
+ test.done();
+ },
+
+ testDateRngFmtcaESRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11 – 1/14");
+ test.done();
+ },
+ testDateRngFmtcaESRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "de nov. 2011 – de gen. 2014");
+ test.done();
+ },
+ testDateRngFmtcaESRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "de novembre de 2011 – de gener de 2014");
+ test.done();
+ },
+ testDateRngFmtcaESRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "de novembre de 2011 – de gener de 2014");
+ test.done();
+ },
+ testDateRngFmtcaESManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ca-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/daterange/testdatefmtrange_fmttemplate.js b/js/test/daterange/testdatefmtrange_fmttemplate.js
index 0b36859b72..cdc74bad04 100644
--- a/js/test/daterange/testdatefmtrange_fmttemplate.js
+++ b/js/test/daterange/testdatefmtrange_fmttemplate.js
@@ -13866,6 +13866,502 @@ module.exports.testdaterangefmt = {
test.done();
},
+ testDateRngFmt_be_BY: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+
+ //dmy
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"be-BY", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+ test.equal(templatec00[0], '{sd} {sm} {sy} г. у {st} – {et}');
+ test.equal(templatec00[1], '{sd} {sm} {sy} г. у {st} – {et}');
+ test.equal(templatec00[2], '{sd}.{sm}.{sy}, {st} – {et}');
+ test.equal(templatec00[3], '{sd}.{sm}.{sy}, {st} – {et}');
+
+ test.equal(templatec01[0], '{sd} {sm} {sy} г. у {st} – {ed} {em} {ey} г. у {et}');
+ test.equal(templatec01[1], '{sd} {sm} {sy} г. у {st} – {ed} {em} {ey} г. у {et}');
+ test.equal(templatec01[2], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+ test.equal(templatec01[3], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+
+ test.equal(templatec02[1], '{sd} {sm} {sy} г. у {st} – {ed} {em} {ey} г. у {et}');
+ test.equal(templatec02[0], '{sd} {sm} {sy} г. у {st} – {ed} {em} {ey} г. у {et}');
+ test.equal(templatec02[2], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+ test.equal(templatec02[3], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+
+ test.equal(templatec03[0], '{sd} {sm} {sy} г. у {st} – {ed} {em} {ey} г. у {et}');
+ test.equal(templatec03[1], '{sd} {sm} {sy} г. у {st} – {ed} {em} {ey} г. у {et}');
+ test.equal(templatec03[2], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+ test.equal(templatec03[3], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+
+ test.equal(templatec10[0], '{sd} – {ed} {em} {ey} г.');
+ test.equal(templatec10[1], '{sd} – {ed} {em} {ey} г.');
+ test.equal(templatec10[2], '{sd} – {ed}.{em}.{ey}');
+ test.equal(templatec10[3], '{sd} – {ed}.{em}.{ey}');
+
+ test.equal(templatec11[0], '{sd} {sm} – {ed} {em} {ey} г.');
+ test.equal(templatec11[1], '{sd} {sm} – {ed} {em} {ey} г.');
+ test.equal(templatec11[2], '{sd}.{sm} – {ed}.{em}.{ey}');
+ test.equal(templatec11[3], '{sd}.{sm} – {ed}.{em}.{ey}');
+
+ test.equal(templatec12[0], '{sd} {sm} {sy} г. – {ed} {em} {ey} г.');
+ test.equal(templatec12[1], '{sd} {sm} {sy} г. – {ed} {em} {ey} г.');
+ test.equal(templatec12[2], '{sd}.{sm}.{sy} – {ed}.{em}.{ey}');
+ test.equal(templatec12[3], '{sd}.{sm}.{sy} – {ed}.{em}.{ey}');
+
+ test.equal(templatec20[0], '{sm} {sy} г. – {em} {ey} г.');
+ test.equal(templatec20[1], '{sm} {sy} г. – {em} {ey} г.');
+ test.equal(templatec20[2], '{sm}.{sy} – {em}.{ey}');
+ test.equal(templatec20[3], '{sm}.{sy} – {em}.{ey}');
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_lo_LA: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"lo-LA", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+
+ test.equal(templatec00[0], '{sd} {sm} {sy}, {st} – {et}');
+ test.equal(templatec00[1], '{sd} {sm} {sy}, {st} – {et}');
+ test.equal(templatec00[2], '{sd} {sm} {sy}, {st} – {et}');
+ test.equal(templatec00[3], '{sd}/{sm}/{sy}, {st} – {et}');
+
+ test.equal(templatec01[0], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec01[1], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec01[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec01[3], '{sd}/{sm}/{sy}, {st} – {ed}/{em}/{ey}, {et}');
+
+ test.equal(templatec02[1], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec02[0], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec02[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec02[3], '{sd}/{sm}/{sy}, {st} – {ed}/{em}/{ey}, {et}');
+
+ test.equal(templatec03[0], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec03[1], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec03[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec03[3], '{sd}/{sm}/{sy}, {st} – {ed}/{em}/{ey}, {et}');
+
+ test.equal(templatec10[0], '{sd} – {ed} {em} {ey}');
+ test.equal(templatec10[1], '{sd} – {ed} {em} {ey}');
+ test.equal(templatec10[2], '{sd} – {ed} {em} {ey}');
+ test.equal(templatec10[3], '{sd} – {ed}/{em}/{ey}');
+
+ test.equal(templatec11[0], '{sd} {sm} – {ed} {em} {ey}');
+ test.equal(templatec11[1], '{sd} {sm} – {ed} {em} {ey}');
+ test.equal(templatec11[2], '{sd} {sm} – {ed} {em} {ey}');
+ test.equal(templatec11[3], '{sd}/{sm} – {ed}/{em}/{ey}');
+
+ test.equal(templatec12[0], '{sd} {sm} {sy} – {ed} {em} {ey}');
+ test.equal(templatec12[1], '{sd} {sm} {sy} – {ed} {em} {ey}');
+ test.equal(templatec12[2], '{sd} {sm} {sy} – {ed} {em} {ey}');
+ test.equal(templatec12[3], '{sd}/{sm}/{sy} – {ed}/{em}/{ey}');
+
+ test.equal(templatec20[0], '{sm} {sy} – {em} {ey}');
+ test.equal(templatec20[1], '{sm} {sy} – {em} {ey}');
+ test.equal(templatec20[2], '{sm} {sy} – {em} {ey}');
+ test.equal(templatec20[3], '{sm}/{sy} – {em}/{ey}');
+
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_ky_KG: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+ // f,l,m: ydm
+ // s: dmy
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"ky-KG", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+ test.equal(templatec00[0], '{sy}-ж., {sd}-{sm} {st} – {et}');
+ test.equal(templatec00[1], '{sy}-ж., {sd}-{sm} {st} – {et}');
+ test.equal(templatec00[2], '{sy}-ж., {sd}-{sm} {st} – {et}');
+ test.equal(templatec00[3], '{sd}/{sm}/{sy} {st} – {et}');
+
+ test.equal(templatec01[0], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec01[1], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec01[2], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec01[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec02[1], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec02[0], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec02[2], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec02[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec03[0], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec03[1], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec03[2], '{sy}-ж., {sd}-{sm} {st} – {ey}-ж., {ed}-{em} {et}');
+ test.equal(templatec03[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec10[0], '{sy}-ж., {sd}-{sm} – {ed}-{em}');
+ test.equal(templatec10[1], '{sy}-ж., {sd}-{sm} – {ed}-{em}');
+ test.equal(templatec10[2], '{sy}-ж., {sd}-{sm} – {ed}-{em}');
+ test.equal(templatec10[3], '{sd} – {ed}/{em}/{ey}');
+
+ test.equal(templatec11[0], '{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}');
+ test.equal(templatec11[1], '{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}');
+ test.equal(templatec11[2], '{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}');
+ test.equal(templatec11[3], '{sd}/{sm} – {ed}/{em}/{ey}');
+
+ test.equal(templatec12[0], '{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}');
+ test.equal(templatec12[1], '{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}');
+ test.equal(templatec12[2], '{sy}-ж., {sd}-{sm} – {ey}-ж., {ed}-{em}');
+ test.equal(templatec12[3], '{sd}/{sm}/{sy} – {ed}/{em}/{ey}');
+
+ test.equal(templatec20[0], '{sy}-ж., {sm} – {ey}-ж., {em}');
+ test.equal(templatec20[1], '{sy}-ж., {sm} – {ey}-ж., {em}');
+ test.equal(templatec20[2], '{sy}-ж., {sm} – {ey}-ж., {em}');
+
+ test.equal(templatec20[3], '{sm}/{sy} – {em}/{ey}');
+
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_ca_AD: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+
+ //dmy
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"ca-AD", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+ test.equal(templatec00[0], '{sd} {sm} de {sy} a les {st} – {et}');
+ test.equal(templatec00[1], '{sd} {sm} de {sy} a les {st} – {et}');
+ test.equal(templatec00[2], '{sd} {sm} {sy}, {st} – {et}');
+ test.equal(templatec00[3], '{sd}/{sm}/{sy} {st} – {et}');
+
+ test.equal(templatec01[0], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec01[1], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec01[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec01[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec02[1], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec02[0], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec02[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec02[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec03[0], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec03[1], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec03[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec03[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec10[0], '{sd} – {ed} {em} de {ey}');
+ test.equal(templatec10[1], '{sd} – {ed} {em} de {ey}');
+ test.equal(templatec10[2], '{sd} – {ed} {em} {ey}');
+ test.equal(templatec10[3], '{sd} – {ed}/{em}/{ey}');
+
+ test.equal(templatec11[0], '{sd} {sm} – {ed} {em} de {ey}');
+ test.equal(templatec11[1], '{sd} {sm} – {ed} {em} de {ey}');
+ test.equal(templatec11[2], '{sd} {sm} – {ed} {em} {ey}');
+ test.equal(templatec11[3], '{sd}/{sm} – {ed}/{em}/{ey}');
+
+ test.equal(templatec12[0], '{sd} {sm} de {sy} – {ed} {em} de {ey}');
+ test.equal(templatec12[1], '{sd} {sm} de {sy} – {ed} {em} de {ey}');
+ test.equal(templatec12[2], '{sd} {sm} {sy} – {ed} {em} {ey}');
+ test.equal(templatec12[3], '{sd}/{sm}/{sy} – {ed}/{em}/{ey}');
+
+ test.equal(templatec20[0], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[1], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[2], '{sm} {sy} – {em} {ey}');
+ test.equal(templatec20[3], '{sm}/{sy} – {em}/{ey}');
+
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_ca_ES: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+ //dmy
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"ca-ES", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+
+ test.equal(templatec00[0], '{sd} {sm} de {sy} a les {st} – {et}');
+ test.equal(templatec00[1], '{sd} {sm} de {sy} a les {st} – {et}');
+ test.equal(templatec00[2], '{sd} {sm} {sy}, {st} – {et}');
+ test.equal(templatec00[3], '{sd}/{sm}/{sy} {st} – {et}');
+
+ test.equal(templatec01[0], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec01[1], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec01[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec01[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec02[1], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec02[0], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec02[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec02[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec03[0], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec03[1], '{sd} {sm} de {sy} a les {st} – {ed} {em} de {ey} a les {et}');
+ test.equal(templatec03[2], '{sd} {sm} {sy}, {st} – {ed} {em} {ey}, {et}');
+ test.equal(templatec03[3], '{sd}/{sm}/{sy} {st} – {ed}/{em}/{ey} {et}');
+
+ test.equal(templatec10[0], '{sd} – {ed} {em} de {ey}');
+ test.equal(templatec10[1], '{sd} – {ed} {em} de {ey}');
+ test.equal(templatec10[2], '{sd} – {ed} {em} {ey}');
+ test.equal(templatec10[3], '{sd} – {ed}/{em}/{ey}');
+
+ test.equal(templatec11[0], '{sd} {sm} – {ed} {em} de {ey}');
+ test.equal(templatec11[1], '{sd} {sm} – {ed} {em} de {ey}');
+ test.equal(templatec11[2], '{sd} {sm} – {ed} {em} {ey}');
+ test.equal(templatec11[3], '{sd}/{sm} – {ed}/{em}/{ey}');
+
+ test.equal(templatec12[0], '{sd} {sm} de {sy} – {ed} {em} de {ey}');
+ test.equal(templatec12[1], '{sd} {sm} de {sy} – {ed} {em} de {ey}');
+ test.equal(templatec12[2], '{sd} {sm} {sy} – {ed} {em} {ey}');
+ test.equal(templatec12[3], '{sd}/{sm}/{sy} – {ed}/{em}/{ey}');
+
+ test.equal(templatec20[0], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[1], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[2], '{sm} {sy} – {em} {ey}');
+ test.equal(templatec20[3], '{sm}/{sy} – {em}/{ey}');
+
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_hy_AM: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+
+ //dmy
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"hy-AM", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+ test.equal(templatec00[0], '{sy} թ. {sm} {sd}, {st} – {et}');
+ test.equal(templatec00[1], '{sd} {sm}, {sy} թ., {st} – {et}');
+ test.equal(templatec00[2], '{sd} {sm}, {sy} թ., {st} – {et}');
+ test.equal(templatec00[3], '{sd}.{sm}.{sy}, {st} – {et}');
+
+ test.equal(templatec01[0], '{sy} թ. {sm} {sd}, {st} – {ey} թ. {em} {ed}, {et}');
+ test.equal(templatec01[1], '{sd} {sm}, {sy} թ., {st} – {ed} {em}, {ey} թ., {et}');
+ test.equal(templatec01[2], '{sd} {sm}, {sy} թ., {st} – {ed} {em}, {ey} թ., {et}');
+ test.equal(templatec01[3], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+
+ test.equal(templatec02[0], '{sy} թ. {sm} {sd}, {st} – {ey} թ. {em} {ed}, {et}');
+ test.equal(templatec02[1], '{sd} {sm}, {sy} թ., {st} – {ed} {em}, {ey} թ., {et}');
+ test.equal(templatec02[2], '{sd} {sm}, {sy} թ., {st} – {ed} {em}, {ey} թ., {et}');
+ test.equal(templatec02[3], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+
+ test.equal(templatec03[0], '{sy} թ. {sm} {sd}, {st} – {ey} թ. {em} {ed}, {et}');
+ test.equal(templatec03[1], '{sd} {sm}, {sy} թ., {st} – {ed} {em}, {ey} թ., {et}');
+ test.equal(templatec03[2], '{sd} {sm}, {sy} թ., {st} – {ed} {em}, {ey} թ., {et}');
+ test.equal(templatec03[3], '{sd}.{sm}.{sy}, {st} – {ed}.{em}.{ey}, {et}');
+
+ test.equal(templatec10[0], '{sy} թ. {sm} {sd} – {ed}');
+ test.equal(templatec10[1], '{sd} – {ed} {em}, {ey} թ.');
+ test.equal(templatec10[2], '{sd} – {ed} {em}, {ey} թ.');
+ test.equal(templatec10[3], '{sd} – {ed}.{em}.{ey}');
+
+ test.equal(templatec11[0], '{sy} թ. {sm} {sd} – {em} {ed}');
+ test.equal(templatec11[1], '{sd} {sm} – {ed} {em}, {ey} թ.');
+ test.equal(templatec11[2], '{sd} {sm} – {ed} {em}, {ey} թ.');
+ test.equal(templatec11[3], '{sd}.{sm} – {ed}.{em}.{ey}');
+
+ test.equal(templatec12[0], '{sy} թ. {sm} {sd} – {ey} թ. {em} {ed}');
+ test.equal(templatec12[1], '{sd} {sm}, {sy} թ. – {ed} {em}, {ey} թ.');
+ test.equal(templatec12[2], '{sd} {sm}, {sy} թ. – {ed} {em}, {ey} թ.');
+ test.equal(templatec12[3], '{sd}.{sm}.{sy} – {ed}.{em}.{ey}');
+
+ test.equal(templatec20[0], '{sy} թ. {sm} – {ey} թ. {em}');
+ test.equal(templatec20[1], '{sm}, {sy} թ. – {em}, {ey} թ.');
+ test.equal(templatec20[2], '{sm}, {sy} թ. – {em}, {ey} թ.');
+ test.equal(templatec20[3], '{sm}.{sy} – {em}.{ey}');
+
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_gl_ES: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+ //dmy
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"gl-ES", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+ test.equal(templatec00[0], '{st} – {et} do {sd} de {sm} de {sy}');
+ test.equal(templatec00[1], '{st} – {et} do {sd} de {sm} de {sy}');
+ test.equal(templatec00[2], '{st} – {et}, {sd} de {sm} de {sy}');
+ test.equal(templatec00[3], '{st} – {et}, {sd}/{sm}/{sy}');
+
+ test.equal(templatec01[0], '{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}');
+ test.equal(templatec01[1], '{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}');
+ test.equal(templatec01[2], '{st}, {sd} de {sm} de {sy} – {et}, {ed} de {em} de {ey}');
+ test.equal(templatec01[3], '{st}, {sd}/{sm}/{sy} – {et}, {ed}/{em}/{ey}');
+
+ test.equal(templatec02[1], '{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}');
+ test.equal(templatec02[0], '{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}');
+ test.equal(templatec02[2], '{st}, {sd} de {sm} de {sy} – {et}, {ed} de {em} de {ey}');
+ test.equal(templatec02[3], '{st}, {sd}/{sm}/{sy} – {et}, {ed}/{em}/{ey}');
+
+ test.equal(templatec03[0], '{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}');
+ test.equal(templatec03[1], '{st} do {sd} de {sm} de {sy} – {et} do {ed} de {em} de {ey}');
+ test.equal(templatec03[2], '{st}, {sd} de {sm} de {sy} – {et}, {ed} de {em} de {ey}');
+ test.equal(templatec03[3], '{st}, {sd}/{sm}/{sy} – {et}, {ed}/{em}/{ey}');
+
+ test.equal(templatec10[0], '{sd} – {ed} de {em} de {ey}');
+ test.equal(templatec10[1], '{sd} – {ed} de {em} de {ey}');
+ test.equal(templatec10[2], '{sd} – {ed} de {em} de {ey}');
+ test.equal(templatec10[3], '{sd} – {ed}/{em}/{ey}');
+
+ test.equal(templatec11[0], '{sd} de {sm} – {ed} de {em} de {ey}');
+ test.equal(templatec11[1], '{sd} de {sm} – {ed} de {em} de {ey}');
+ test.equal(templatec11[2], '{sd} de {sm} – {ed} de {em} de {ey}');
+ test.equal(templatec11[3], '{sd}/{sm} – {ed}/{em}/{ey}');
+
+ test.equal(templatec12[0], '{sd} de {sm} de {sy} – {ed} de {em} de {ey}');
+ test.equal(templatec12[1], '{sd} de {sm} de {sy} – {ed} de {em} de {ey}');
+ test.equal(templatec12[2], '{sd} de {sm} de {sy} – {ed} de {em} de {ey}');
+ test.equal(templatec12[3], '{sd}/{sm}/{sy} – {ed}/{em}/{ey}');
+
+ test.equal(templatec20[0], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[1], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[2], '{sm} de {sy} – {em} de {ey}');
+ test.equal(templatec20[3], '{sm}/{sy} – {em}/{ey}');
+
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
testDateRngFmt_eu_ES: function(test) {
test.expect(36);
var fmt;
@@ -13948,7 +14444,6 @@ module.exports.testdaterangefmt = {
var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
var templatec30 = [];
-
// full, medium: ymd
// long: ydm
// short: dmy
@@ -13965,7 +14460,6 @@ module.exports.testdaterangefmt = {
templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
}
-
test.equal(templatec00[0], '{sy}၊ {sm} {sd} {st} – {et}');
test.equal(templatec00[1], '{sy}၊ {sd} {sm} {st} – {et}');
test.equal(templatec00[2], '{sy}၊ {sm} {sd} {st} – {et}');
@@ -14005,6 +14499,77 @@ module.exports.testdaterangefmt = {
test.equal(templatec20[1], '{sy}၊ {sm} – {ey}၊ {em}');
test.equal(templatec20[2], '{sy}၊ {sm} – {ey}၊ {em}');
test.equal(templatec20[3], '{sm}-{sy} – {em}-{ey}');
+ test.equal(templatec30[0], "{sy} – {ey}");
+ test.equal(templatec30[1], "{sy} – {ey}");
+ test.equal(templatec30[2], "{sy} – {ey}");
+ test.equal(templatec30[3], "{sy} – {ey}");
+
+ test.done();
+ },
+ testDateRngFmt_ne_NP: function(test) {
+ test.expect(36);
+ var fmt;
+ var data = setVariables();
+ var length = data["fullLength"];
+ var abbrLength = data["abbrLength"];
+
+ var templatec00 = [],templatec01 = [],templatec02 = [],templatec03 = [];
+ var templatec10 = [],templatec11 = [],templatec12 = [],templatec20 = [];
+ var templatec30 = [];
+
+ //ymd
+ for (var i=0; i < 4; i++) {
+ fmt = new DateRngFmt({locale:"ne-NP", length: length[i]})
+ templatec00.push(fmt.dateFmt.formats.range["c00"][abbrLength[i]]);
+ templatec01.push(fmt.dateFmt.formats.range["c01"][abbrLength[i]]);
+ templatec02.push(fmt.dateFmt.formats.range["c02"][abbrLength[i]]);
+ templatec03.push(fmt.dateFmt.formats.range["c03"][abbrLength[i]]);
+ templatec10.push(fmt.dateFmt.formats.range["c10"][abbrLength[i]]);
+ templatec11.push(fmt.dateFmt.formats.range["c11"][abbrLength[i]]);
+ templatec12.push(fmt.dateFmt.formats.range["c12"][abbrLength[i]]);
+ templatec20.push(fmt.dateFmt.formats.range["c20"][abbrLength[i]]);
+ templatec30.push(fmt.dateFmt.formats.range["c30"][abbrLength[i]]);
+ }
+
+ test.equal(templatec00[0], '{sy} {sm} {sd} {st} – {et}');
+ test.equal(templatec00[1], '{sy} {sm} {sd} {st} – {et}');
+ test.equal(templatec00[2], '{sy} {sm} {sd}, {st} – {et}');
+ test.equal(templatec00[3], '{sy}/{sm}/{sd}, {st} – {et}');
+
+ test.equal(templatec01[0], '{sy} {sm} {sd} {st} – {ey} {em} {ed} {et}');
+ test.equal(templatec01[1], '{sy} {sm} {sd} {st} – {ey} {em} {ed} {et}');
+ test.equal(templatec01[2], '{sy} {sm} {sd}, {st} – {ey} {em} {ed}, {et}');
+ test.equal(templatec01[3], '{sy}/{sm}/{sd}, {st} – {ey}/{em}/{ed}, {et}');
+
+ test.equal(templatec02[1], '{sy} {sm} {sd} {st} – {ey} {em} {ed} {et}');
+ test.equal(templatec02[0], '{sy} {sm} {sd} {st} – {ey} {em} {ed} {et}');
+ test.equal(templatec02[2], '{sy} {sm} {sd}, {st} – {ey} {em} {ed}, {et}');
+ test.equal(templatec02[3], '{sy}/{sm}/{sd}, {st} – {ey}/{em}/{ed}, {et}');
+
+ test.equal(templatec03[0], '{sy} {sm} {sd} {st} – {ey} {em} {ed} {et}');
+ test.equal(templatec03[1], '{sy} {sm} {sd} {st} – {ey} {em} {ed} {et}');
+ test.equal(templatec03[2], '{sy} {sm} {sd}, {st} – {ey} {em} {ed}, {et}');
+ test.equal(templatec03[3], '{sy}/{sm}/{sd}, {st} – {ey}/{em}/{ed}, {et}');
+
+ test.equal(templatec10[0], '{sy} {sm} {sd} – {ed}');
+ test.equal(templatec10[1], '{sy} {sm} {sd} – {ed}');
+ test.equal(templatec10[2], '{sy} {sm} {sd} – {ed}');
+ test.equal(templatec10[3], '{sy}/{sm}/{sd} – {ed}');
+
+ test.equal(templatec11[0], '{sy} {sm} {sd} – {em} {ed}');
+ test.equal(templatec11[1], '{sy} {sm} {sd} – {em} {ed}');
+ test.equal(templatec11[2], '{sy} {sm} {sd} – {ey} {em} {ed}');
+ test.equal(templatec11[3], '{sy}/{sm}/{sd} – {ey}/{em}/{ed}');
+
+ test.equal(templatec12[0], '{sy} {sm} {sd} – {ey} {em} {ed}');
+ test.equal(templatec12[1], '{sy} {sm} {sd} – {ey} {em} {ed}');
+ test.equal(templatec12[2], '{sy} {sm} {sd} – {ey} {em} {ed}');
+ test.equal(templatec12[3], '{sy}/{sm}/{sd} – {ey}/{em}/{ed}');
+
+ test.equal(templatec20[0], '{sy} {sm} – {ey} {em}');
+ test.equal(templatec20[1], '{sy} {sm} – {ey} {em}');
+ test.equal(templatec20[2], '{sy} {sm} – {ey} {em}');
+ test.equal(templatec20[3], '{sy}/{sm} – {ey}/{em}');
test.equal(templatec30[0], "{sy} – {ey}");
test.equal(templatec30[1], "{sy} – {ey}");
diff --git a/js/test/daterange/testdatefmtrange_gl_ES.js b/js/test/daterange/testdatefmtrange_gl_ES.js
new file mode 100644
index 0000000000..57d142f673
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_gl_ES.js
@@ -0,0 +1,692 @@
+/*
+ * testdatefmtrange_gl_ES.js - test the date range formatter object Galician-Spain
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_gl_ES = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateRngFmtglESRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45 – 14:30, 31/12/11");
+ test.done();
+ },
+ testDateRngFmtglESRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45 – 14:30, 31 de dec. de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45 – 14:30 do 31 de decembro de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45 – 14:30 do 31 de decembro de 2011");
+ test.done();
+ },
+
+ testDateRngFmtglESRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45, 30/12/11 – 14:30, 31/12/11");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45, 30 de dec. de 2011 – 14:30, 31 de dec. de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45 do 30 de decembro de 2011 – 14:30 do 31 de decembro de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "13:45 do 30 de decembro de 2011 – 14:30 do 31 de decembro de 2011");
+ test.done();
+ },
+
+ testDateRngFmtglESRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtglESRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de dec. de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de decembro de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 de decembro de 2011");
+ test.done();
+ },
+
+ testDateRngFmtglESRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de nov. – 31 de dec. de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembro – 31 de decembro de 2011");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembro – 31 de decembro de 2011");
+ test.done();
+ },
+
+ testDateRngFmtglESRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11/11 – 31/01/12");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de nov. de 2011 – 31 de xan. de 2012");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembro de 2011 – 31 de xaneiro de 2012");
+ test.done();
+ },
+ testDateRngFmtglESRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 de novembro de 2011 – 31 de xaneiro de 2012");
+ test.done();
+ },
+
+ testDateRngFmtglESRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11 – 01/14");
+ test.done();
+ },
+ testDateRngFmtglESRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "nov. de 2011 – xan. de 2014");
+ test.done();
+ },
+ testDateRngFmtglESRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "novembro de 2011 – xaneiro de 2014");
+ test.done();
+ },
+ testDateRngFmtglESRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "novembro de 2011 – xaneiro de 2014");
+ test.done();
+ },
+ testDateRngFmtglESManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "gl-ES", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/daterange/testdatefmtrange_hy_AM.js b/js/test/daterange/testdatefmtrange_hy_AM.js
new file mode 100644
index 0000000000..71dc7ac6a9
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_hy_AM.js
@@ -0,0 +1,692 @@
+/*
+ * testdatefmtrange_hy_AM.js - test the date range formatter object Georgian/Georgia
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_hy_AM = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateRngFmthyAMRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31.12.11, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmthyAMRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 դեկ, 2011 թ., 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmthyAMRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 դեկտեմբերի, 2011 թ., 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmthyAMRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 թ. դեկտեմբերի 31, 13:45 – 14:30");
+ test.done();
+ },
+
+ testDateRngFmthyAMRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30.12.11, 13:45 – 31.12.11, 14:30");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 դեկ, 2011 թ., 13:45 – 31 դեկ, 2011 թ., 14:30");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 դեկտեմբերի, 2011 թ., 13:45 – 31 դեկտեմբերի, 2011 թ., 14:30");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 թ. դեկտեմբերի 30, 13:45 – 2011 թ. դեկտեմբերի 31, 14:30");
+ test.done();
+ },
+
+ testDateRngFmthyAMRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31.12.11");
+ test.done();
+ },
+ testDateRngFmthyAMRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 դեկ, 2011 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 դեկտեմբերի, 2011 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 թ. դեկտեմբերի 20 – 31");
+ test.done();
+ },
+
+ testDateRngFmthyAMRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20.11 – 31.12.11");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 նոյ – 31 դեկ, 2011 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 նոյեմբերի – 31 դեկտեմբերի, 2011 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 թ. նոյեմբերի 20 – դեկտեմբերի 31");
+ test.done();
+ },
+
+ testDateRngFmthyAMRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20.11.11 – 31.01.12");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 նոյ, 2011 թ. – 31 հնվ, 2012 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 նոյեմբերի, 2011 թ. – 31 հունվարի, 2012 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 թ. նոյեմբերի 20 – 2012 թ. հունվարի 31");
+ test.done();
+ },
+
+ testDateRngFmthyAMRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11.11 – 01.14");
+ test.done();
+ },
+ testDateRngFmthyAMRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "նոյ, 2011 թ. – հնվ, 2014 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "նոյեմբերի, 2011 թ. – հունվարի, 2014 թ.");
+ test.done();
+ },
+ testDateRngFmthyAMRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 թ. նոյեմբերի – 2014 թ. հունվարի");
+ test.done();
+ },
+ testDateRngFmthyAMManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "hy-AM", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/daterange/testdatefmtrange_ky_KG.js b/js/test/daterange/testdatefmtrange_ky_KG.js
new file mode 100644
index 0000000000..a568e497f3
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_ky_KG.js
@@ -0,0 +1,692 @@
+/*
+ * testdatefmtrange_ky_KG.js - test the date range formatter object Kyrgyz/Kyrgyzstan
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_ky_KG = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateRngFmtkyKGRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31/12/11 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 31-дек. 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 31-декабрь 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 31-декабрь 13:45 – 14:30");
+ test.done();
+ },
+
+ testDateRngFmtkyKGRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30/12/11 13:45 – 31/12/11 14:30");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 30-дек. 13:45 – 2011-ж., 31-дек. 14:30");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 30-декабрь 13:45 – 2011-ж., 31-декабрь 14:30");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 30-декабрь 13:45 – 2011-ж., 31-декабрь 14:30");
+ test.done();
+ },
+
+ testDateRngFmtkyKGRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-дек. – 31-дек.");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-декабрь – 31-декабрь");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-декабрь – 31-декабрь");
+ test.done();
+ },
+
+ testDateRngFmtkyKGRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11 – 31/12/11");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-ноя. – 2011-ж., 31-дек.");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-ноябрь – 2011-ж., 31-декабрь");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-ноябрь – 2011-ж., 31-декабрь");
+ test.done();
+ },
+
+ testDateRngFmtkyKGRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11/11 – 31/1/12");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-ноя. – 2012-ж., 31-янв.");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-ноябрь – 2012-ж., 31-январь");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., 20-ноябрь – 2012-ж., 31-январь");
+ test.done();
+ },
+
+ testDateRngFmtkyKGRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11 – 1/14");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., ноя. – 2014-ж., янв.");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., ноябрь – 2014-ж., январь");
+ test.done();
+ },
+ testDateRngFmtkyKGRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011-ж., ноябрь – 2014-ж., январь");
+ test.done();
+ },
+ testDateRngFmtkyKGManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ky-KG", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/daterange/testdatefmtrange_lo_LA.js b/js/test/daterange/testdatefmtrange_lo_LA.js
new file mode 100644
index 0000000000..0f82eb2321
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_lo_LA.js
@@ -0,0 +1,692 @@
+/*
+ * testdatefmtrange_lo_LA.js - test the date range formatter object Lao/Laos
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_lo_LA = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateRngFmtloLARangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31/12/2011, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtloLARangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 ທ.ວ. 2011, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtloLARangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 ທັນວາ 2011, 13:45 – 14:30");
+ test.done();
+ },
+ testDateRngFmtloLARangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "31 ທັນວາ 2011, 13:45 – 14:30");
+ test.done();
+ },
+
+ testDateRngFmtloLARangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30/12/2011, 13:45 – 31/12/2011, 14:30");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 ທ.ວ. 2011, 13:45 – 31 ທ.ວ. 2011, 14:30");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 ທັນວາ 2011, 13:45 – 31 ທັນວາ 2011, 14:30");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "30 ທັນວາ 2011, 13:45 – 31 ທັນວາ 2011, 14:30");
+ test.done();
+ },
+
+ testDateRngFmtloLARangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31/12/2011");
+ test.done();
+ },
+ testDateRngFmtloLARangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 ທ.ວ. 2011");
+ test.done();
+ },
+ testDateRngFmtloLARangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 ທັນວາ 2011");
+ test.done();
+ },
+ testDateRngFmtloLARangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 – 31 ທັນວາ 2011");
+ test.done();
+ },
+
+ testDateRngFmtloLARangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11 – 31/12/2011");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 ພ.ຈ. – 31 ທ.ວ. 2011");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 ພະຈິກ – 31 ທັນວາ 2011");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 ພະຈິກ – 31 ທັນວາ 2011");
+ test.done();
+ },
+
+ testDateRngFmtloLARangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20/11/2011 – 31/1/2012");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 ພ.ຈ. 2011 – 31 ມ.ກ. 2012");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 ພະຈິກ 2011 – 31 ມັງກອນ 2012");
+ test.done();
+ },
+ testDateRngFmtloLARangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "20 ພະຈິກ 2011 – 31 ມັງກອນ 2012");
+ test.done();
+ },
+
+ testDateRngFmtloLARangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "short"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/2011 – 1/2014");
+ test.done();
+ },
+ testDateRngFmtloLARangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "medium"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "ພ.ຈ. 2011 – ມ.ກ. 2014");
+ test.done();
+ },
+ testDateRngFmtloLARangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "long"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "ພະຈິກ 2011 – ມັງກອນ 2014");
+ test.done();
+ },
+ testDateRngFmtloLARangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "ພະຈິກ 2011 – ມັງກອນ 2014");
+ test.done();
+ },
+ testDateRngFmtloLAManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "lo-LA", length: "full"});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/daterange/testdatefmtrange_ne_NP.js b/js/test/daterange/testdatefmtrange_ne_NP.js
new file mode 100644
index 0000000000..f8216f72bc
--- /dev/null
+++ b/js/test/daterange/testdatefmtrange_ne_NP.js
@@ -0,0 +1,692 @@
+/*
+ * testdatefmtrange_ne_NP.js - test the date range formatter object Nepali-Nepal
+ *
+ * Copyright © 2020, JEDLSoft
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+if (typeof(GregorianDate) === "undefined") {
+ var GregorianDate = require("../../lib/GregorianDate.js");
+}
+if (typeof(DateRngFmt) === "undefined") {
+ var DateRngFmt = require("../../lib/DateRngFmt.js");
+}
+
+if (typeof(ilib) === "undefined") {
+ var ilib = require("../../lib/ilib.js");
+}
+
+module.exports.testdatefmtrange_ne_NP = {
+ setUp: function(callback) {
+ ilib.clearCache();
+ callback();
+ },
+
+ testDateRngFmtneNPRangeInDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '11/12/31, 13:45 – 14:30');
+ test.done();
+ },
+ testDateRngFmtneNPRangeInDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 31, 13:45 – 14:30');
+ test.done();
+ },
+ testDateRngFmtneNPRangeInDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 31 13:45 – 14:30');
+ test.done();
+ },
+ testDateRngFmtneNPRangeInDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 31 13:45 – 14:30');
+ test.done();
+ },
+
+ testDateRngFmtneNPRangeNextDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '11/12/30, 13:45 – 11/12/31, 14:30');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 30, 13:45 – 2011 डिसेम्बर 31, 14:30');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 30 13:45 – 2011 डिसेम्बर 31 14:30');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 30,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 30 13:45 – 2011 डिसेम्बर 31 14:30');
+ test.done();
+ },
+
+ testDateRngFmtneNPRangeMultiDayShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/12/20 – 31");
+ test.done();
+ },
+ testDateRngFmtneNPRangeMultiDayMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 20 – 31');
+ test.done();
+ },
+ testDateRngFmtneNPRangeMultiDayLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 20 – 31');
+ test.done();
+ },
+ testDateRngFmtneNPRangeMultiDayFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 डिसेम्बर 20 – 31');
+ test.done();
+ },
+
+ testDateRngFmtneNPRangeNextMonthShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11/20 – 11/12/31");
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextMonthMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर 20 – 2011 डिसेम्बर 31');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextMonthLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर 20 – डिसेम्बर 31');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextMonthFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2011,
+ month: 12,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर 20 – डिसेम्बर 31');
+ test.done();
+ },
+
+ testDateRngFmtneNPRangeNextYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11/20 – 12/1/31");
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर 20 – 2012 जनवरी 31');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर 20 – 2012 जनवरी 31');
+ test.done();
+ },
+ testDateRngFmtneNPRangeNextYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2012,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर 20 – 2012 जनवरी 31');
+ test.done();
+ },
+
+ testDateRngFmtneNPRangeMultiYearShort: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "short", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "11/11 – 14/1");
+ test.done();
+ },
+ testDateRngFmtneNPRangeMultiYearMedium: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "medium", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर – 2014 जनवरी');
+ test.done();
+ },
+ testDateRngFmtneNPRangeMultiYearLong: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "long", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), '2011 नोभेम्बर – 2014 जनवरी');
+ test.done();
+ },
+ testDateRngFmtneNPRangeMultiYearFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2014,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 नोभेम्बर – 2014 जनवरी");
+ test.done();
+ },
+ testDateRngFmtneNPManyYearsFull: function(test) {
+ test.expect(2);
+ var fmt = new DateRngFmt({locale: "ne-NP", length: "full", useNative: false});
+ test.ok(fmt !== null);
+
+ var start = new GregorianDate({
+ year: 2011,
+ month: 11,
+ day: 20,
+ hour: 13,
+ minute: 45,
+ second: 0,
+ millisecond: 0
+ });
+ var end = new GregorianDate({
+ year: 2064,
+ month: 1,
+ day: 31,
+ hour: 14,
+ minute: 30,
+ second: 0,
+ millisecond: 0
+ });
+ test.equal(fmt.format(start, end), "2011 – 2064");
+ test.done();
+ }
+};
\ No newline at end of file
diff --git a/js/test/durfmt/testdurfmt2.js b/js/test/durfmt/testdurfmt2.js
index 74c4eab00c..1de5674ddb 100644
--- a/js/test/durfmt/testdurfmt2.js
+++ b/js/test/durfmt/testdurfmt2.js
@@ -9037,6 +9037,292 @@ module.exports.testdurfmt2 = {
test.done();
},
+ testDurFmt_be_BY: function(test) {
+ test.expect(24);
+ // 1 3 100
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+
+ var textformatted_1 = [], textformatted_3 = [], textformatted_100 = [];
+ var clockformatted_1 = [], clockformatted_3 = [], clockformatted_100 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "be-BY", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_3.push(textfmt.format({year: 3,month: 3,week: 3,day: 3}).toString());
+ textformatted_100.push(textfmt.format({year: 100,month: 100,week: 100,day: 100}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_3.push(textfmt.format({hour: 3,minute: 3,second: 3}).toString());
+ clockformatted_100.push(textfmt.format({hour: 100,minute: 100,second: 100}).toString());
+ }
+
+ test.equal(textformatted_1[0], '1 год 1 месяц 1 тыдзень 1 суткі');
+ test.equal(textformatted_1[1], '1 г. 1 мес. 1 тыдз. 1 сут');
+ test.equal(textformatted_1[2], '1 г. 1 мес. 1 тыдз. 1 сут');
+ test.equal(textformatted_1[3], '1 г. 1 мес. 1 тыдз. 1 сут');
+
+ test.equal(textformatted_3[0], '3 гады 3 месяца 3 тыдні 3 сутак');
+ test.equal(textformatted_3[1], '3 г. 3 мес. 3 тыдз. 3 сут');
+ test.equal(textformatted_3[2], '3 г. 3 мес. 3 тыдз. 3 сут');
+ test.equal(textformatted_3[3], '3 г. 3 мес. 3 тыдз. 3 сут');
+
+ test.equal(textformatted_100[0], '100 гадоў 100 месяцаў 100 тыдняў 100 сутак');
+ test.equal(textformatted_100[1], '100 г. 100 мес. 100 тыдз. 100 сут');
+ test.equal(textformatted_100[2], '100 г. 100 мес. 100 тыдз. 100 сут');
+ test.equal(textformatted_100[3], '100 г. 100 мес. 100 тыдз. 100 сут');
+
+ test.equal(clockformatted_1[0], '1 гадзіна 1 хвіліна 1 секунда');
+ test.equal(clockformatted_1[1], '1 гадз 1 хв 1 с');
+ test.equal(clockformatted_1[2], '1 гадз 1 хв 1 с');
+ test.equal(clockformatted_1[3], '1 гадз 1 хв 1 с');
+
+ test.equal(clockformatted_3[0], '3 гадзіны 3 хвіліны 3 секунды');
+ test.equal(clockformatted_3[1], '3 гадз 3 хв 3 с');
+ test.equal(clockformatted_3[2], '3 гадз 3 хв 3 с');
+ test.equal(clockformatted_3[3], '3 гадз 3 хв 3 с');
+
+ test.equal(clockformatted_100[0], '100 гадзін 100 хвілін 100 секунд');
+ test.equal(clockformatted_100[1], '100 гадз 100 хв 100 с');
+ test.equal(clockformatted_100[2], '100 гадз 100 хв 100 с');
+ test.equal(clockformatted_100[3], '100 гадз 100 хв 100 с');
+ test.done();
+ },
+ testDurFmt_lo_LA: function(test) {
+ test.expect(16);
+ // 1 18
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+ var textformatted_1 = [],textformatted_13 = [];
+ var clockformatted_1 = [],clockformatted_13 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "lo-LA", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_13.push(textfmt.format({year: 13,month: 13,week: 13,day: 13}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_13.push(textfmt.format({hour: 13,minute: 13,second: 13}).toString());
+ }
+
+ test.equal(textformatted_1[0], '1 ປີ, 1 ເດືອນ, 1 ອາທິດ, 1 ມື້');
+ test.equal(textformatted_1[1], '1 ປີ, 1 ດ., 1 ອທ., 1 ມື້');
+ test.equal(textformatted_1[2], '1 ປ 1 ດ. 1 ອທ. 1 ມ.');
+ test.equal(textformatted_1[3], '1 ປ 1 ດ. 1 ອທ. 1 ມ.');
+
+ test.equal(textformatted_13[0], '13 ປີ, 13 ເດືອນ, 13 ອາທິດ, 13 ມື້');
+ test.equal(textformatted_13[1], '13 ປີ, 13 ດ., 13 ອທ., 13 ມື້');
+ test.equal(textformatted_13[2], '13 ປ 13 ດ. 13 ອທ. 13 ມ.');
+ test.equal(textformatted_13[3], '13 ປ 13 ດ. 13 ອທ. 13 ມ.');
+
+ test.equal(clockformatted_1[0], '1 ຊົ່ວໂມງ, 1 ນາທີ, 1 ວິນາທີ');
+ test.equal(clockformatted_1[1], '1 ຊມ, 1 ນທ, 1 ວິ');
+ test.equal(clockformatted_1[2], '1 ຊມ 1 ນທ 1 ວິ');
+ test.equal(clockformatted_1[3], '1 ຊມ 1 ນທ 1 ວິ');
+
+ test.equal(clockformatted_13[0], '13 ຊົ່ວໂມງ, 13 ນາທີ, 13 ວິນາທີ');
+ test.equal(clockformatted_13[1], '13 ຊມ, 13 ນທ, 13 ວິ');
+ test.equal(clockformatted_13[2], '13 ຊມ 13 ນທ 13 ວິ');
+ test.equal(clockformatted_13[3], '13 ຊມ 13 ນທ 13 ວິ');
+
+ test.done();
+ },
+ testDurFmt_ky_KG: function(test) {
+ test.expect(16);
+ // 1 18
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+ var textformatted_1 = [],textformatted_18 = [];
+ var clockformatted_1 = [],clockformatted_18 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "ky-KG", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_18.push(textfmt.format({year: 18,month: 18,week: 18,day: 18}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_18.push(textfmt.format({hour: 18,minute: 18,second: 18}).toString());
+ }
+ test.equal(textformatted_1[0], '1 жыл, 1 ай, 1 апта, 1 күн');
+ test.equal(textformatted_1[1], '1 ж., 1 ай, 1 апт, 1 күн');
+ test.equal(textformatted_1[2], '1 ж., 1 ай, 1 ап, 1 кн');
+ test.equal(textformatted_1[3], '1 ж. 1 ай 1 ап 1 кн');
+
+ test.equal(textformatted_18[0], '18 жыл, 18 ай, 18 апта, 18 күн');
+ test.equal(textformatted_18[1], '18 ж., 18 ай, 18 апт, 18 күн');
+ test.equal(textformatted_18[2], '18 ж., 18 ай, 18 ап, 18 кн');
+ test.equal(textformatted_18[3], '18 ж. 18 ай 18 ап 18 кн');
+
+ test.equal(clockformatted_1[0], '1 саат, 1 мүнөт, 1 секунд');
+ test.equal(clockformatted_1[1], '1 ст, 1 мүн, 1 сек');
+ test.equal(clockformatted_1[2], '1 ст, 1 мүн, 1 сек');
+ test.equal(clockformatted_1[3], '1 ст 1 мүн 1 сек');
+
+ test.equal(clockformatted_18[0], '18 саат, 18 мүнөт, 18 секунд');
+ test.equal(clockformatted_18[1], '18 ст, 18 мүн, 18 сек');
+ test.equal(clockformatted_18[2], '18 ст, 18 мүн, 18 сек');
+ test.equal(clockformatted_18[3], '18 ст 18 мүн 18 сек');
+ test.done();
+ },
+ testDurFmt_ca_AD: function(test) {
+ test.expect(16);
+ // 1 11
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+ var textformatted_1 = [],textformatted_11 = [];
+ var clockformatted_1 = [],clockformatted_11 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "ca-AD", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_11.push(textfmt.format({year: 11,month: 11,week: 11,day: 11}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_11.push(textfmt.format({hour: 11,minute: 11,second: 11}).toString());
+ }
+ test.equal(textformatted_1[0], '1 any, 1 mes, 1 setmana i 1 dia');
+ test.equal(textformatted_1[1], '1 any, 1 mes, 1 setm., 1 dia');
+ test.equal(textformatted_1[2], '1 any, 1 m, 1 setm., 1 d');
+ test.equal(textformatted_1[3], '1 any, 1 m, 1 setm., 1 d');
+
+ test.equal(textformatted_11[0], '11 anys, 11 mesos, 11 setmanes i 11 dies');
+ test.equal(textformatted_11[1], '11 anys, 11 mesos, 11 setm., 11 dies');
+ test.equal(textformatted_11[2], '11 anys, 11 m, 11 setm., 11 d');
+ test.equal(textformatted_11[3], '11 anys, 11 m, 11 setm., 11 d');
+
+ test.equal(clockformatted_1[0], '1 hora, 1 minut i 1 segon');
+ test.equal(clockformatted_1[1], '1 h, 1 min, 1 s');
+ test.equal(clockformatted_1[2], '1 h, 1 min, 1 s');
+ test.equal(clockformatted_1[3], '1 h, 1 min, 1 s');
+
+ test.equal(clockformatted_11[0], '11 hores, 11 minuts i 11 segons');
+ test.equal(clockformatted_11[1], '11 h, 11 min, 11 s');
+ test.equal(clockformatted_11[2], '11 h, 11 min, 11 s');
+ test.equal(clockformatted_11[3], '11 h, 11 min, 11 s');
+
+ test.done();
+ },
+ testDurFmt_ca_ES: function(test) {
+ test.expect(16);
+ // 1 18
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+ var textformatted_1 = [],textformatted_18 = [];
+ var clockformatted_1 = [],clockformatted_18 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "ca-ES", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_18.push(textfmt.format({year: 18,month: 18,week: 18,day: 18}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_18.push(textfmt.format({hour: 18,minute: 18,second: 18}).toString());
+ }
+
+ test.equal(textformatted_1[0], '1 any, 1 mes, 1 setmana i 1 dia');
+ test.equal(textformatted_1[1], '1 any, 1 mes, 1 setm., 1 dia');
+ test.equal(textformatted_1[2], '1 any, 1 m, 1 setm., 1 d');
+ test.equal(textformatted_1[3], '1 any, 1 m, 1 setm., 1 d');
+
+ test.equal(textformatted_18[0], '18 anys, 18 mesos, 18 setmanes i 18 dies');
+ test.equal(textformatted_18[1], '18 anys, 18 mesos, 18 setm., 18 dies');
+ test.equal(textformatted_18[2], '18 anys, 18 m, 18 setm., 18 d');
+ test.equal(textformatted_18[3], '18 anys, 18 m, 18 setm., 18 d');
+
+ test.equal(clockformatted_1[0], '1 hora, 1 minut i 1 segon');
+ test.equal(clockformatted_1[1], '1 h, 1 min, 1 s');
+ test.equal(clockformatted_1[2], '1 h, 1 min, 1 s');
+ test.equal(clockformatted_1[3], '1 h, 1 min, 1 s');
+
+ test.equal(clockformatted_18[0], '18 hores, 18 minuts i 18 segons');
+ test.equal(clockformatted_18[1], '18 h, 18 min, 18 s');
+ test.equal(clockformatted_18[2], '18 h, 18 min, 18 s');
+ test.equal(clockformatted_18[3], '18 h, 18 min, 18 s');
+ test.done();
+ },
+ testDurFmt_hy_AM: function(test) {
+ test.expect(16);
+ // 1 18
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+ var textformatted_1 = [],textformatted_15 = [];
+ var clockformatted_1 = [],clockformatted_15 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "hy-AM", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_15.push(textfmt.format({year: 15,month: 15,week: 15,day: 15}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_15.push(textfmt.format({hour: 15,minute: 15,second: 15}).toString());
+ }
+
+ test.equal(textformatted_1[0], '1 տարի, 1 ամիս, 1 շաբաթ և 1 օր');
+ test.equal(textformatted_1[1], '1 տ 1 ամս 1 շաբ 1 օր');
+ test.equal(textformatted_1[2], '1 տ 1 ա 1 շ 1 օ');
+ test.equal(textformatted_1[3], '1 տ 1 ա 1 շ 1 օ');
+
+ test.equal(textformatted_15[0], '15 տարի, 15 ամիս, 15 շաբաթ և 15 օր');
+ test.equal(textformatted_15[1], '15 տ 15 ամս 15 շաբ 15 օր');
+ test.equal(textformatted_15[2], '15 տ 15 ա 15 շ 15 օ');
+ test.equal(textformatted_15[3], '15 տ 15 ա 15 շ 15 օ');
+
+ test.equal(clockformatted_1[0], '1 ժամ, 1 րոպե և 1 վայրկյան');
+ test.equal(clockformatted_1[1], '1 ժ 1 ր 1 վրկ');
+ test.equal(clockformatted_1[2], '1 ժ 1 ր 1 վ');
+ test.equal(clockformatted_1[3], '1 ժ 1 ր 1 վ');
+
+ test.equal(clockformatted_15[0], '15 ժամ, 15 րոպե և 15 վայրկյան');
+ test.equal(clockformatted_15[1], '15 ժ 15 ր 15 վրկ');
+ test.equal(clockformatted_15[2], '15 ժ 15 ր 15 վ');
+ test.equal(clockformatted_15[3], '15 ժ 15 ր 15 վ');
+ test.done();
+ },
+ testDurFmt_gl_ES: function(test) {
+ test.expect(16);
+ // 1 11
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+ var textformatted_1 = [],textformatted_11 = [];
+ var clockformatted_1 = [],clockformatted_11 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "gl-ES", style:"text", length:length[i]});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_11.push(textfmt.format({year: 11,month: 11,week: 11,day: 11}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_11.push(textfmt.format({hour: 11,minute: 11,second: 11}).toString());
+ }
+ test.equal(textformatted_1[0], '1 ano, 1 mes, 1 semana e 1 día');
+ test.equal(textformatted_1[1], '1 ano, 1 mes, 1 sem., 1 día');
+ test.equal(textformatted_1[2], '1 a., 1 m., 1 sem., 1 d');
+ test.equal(textformatted_1[3], '1 a., 1 m., 1 sem., 1 d');
+
+ test.equal(textformatted_11[0], '11 anos, 11 meses, 11 semanas e 11 días');
+ test.equal(textformatted_11[1], '11 anos, 11 meses, 11 sem., 11 días');
+ test.equal(textformatted_11[2], '11 a., 11 m., 11 sem., 11 d');
+ test.equal(textformatted_11[3], '11 a., 11 m., 11 sem., 11 d');
+
+ test.equal(clockformatted_1[0], '1 hora, 1 minuto e 1 segundo');
+ test.equal(clockformatted_1[1], '1 h, 1 min, 1 s');
+ test.equal(clockformatted_1[2], '1 h, 1 min, 1 s');
+ test.equal(clockformatted_1[3], '1 h, 1 min, 1 s');
+
+ test.equal(clockformatted_11[0], '11 horas, 11 minutos e 11 segundos');
+ test.equal(clockformatted_11[1], '11 h, 11 min, 11 s');
+ test.equal(clockformatted_11[2], '11 h, 11 min, 11 s');
+ test.equal(clockformatted_11[3], '11 h, 11 min, 11 s');
+
+ test.done();
+ },
testDurFmt_eu_ES: function(test) {
test.expect(16);
// 1 11
@@ -9075,6 +9361,46 @@ module.exports.testdurfmt2 = {
test.equal(clockformatted_11[1], '11 h, 11 min, 11 s');
test.equal(clockformatted_11[2], '11 h, 11 min, 11 s');
test.equal(clockformatted_11[3], '11 h, 11 min, 11 s');
+ test.done();
+ },
+ testDurFmt_ne_NP: function(test) {
+ test.expect(16);
+ // 1 11
+ var textfmt;
+ var data = setVariable();
+ var length = data["fullLength"];
+
+ var textformatted_1 = [], textformatted_9 = [];
+ var clockformatted_1 = [], clockformatted_9 = [];
+
+ for (var i=0; i<4; i++) {
+ textfmt = new DurationFmt({locale: "ne-NP", style:"text", length:length[i], useNative: false});
+ textformatted_1.push(textfmt.format({year: 1,month: 1,week: 1,day: 1}).toString());
+ textformatted_9.push(textfmt.format({year: 9,month: 9,week: 9,day: 9}).toString());
+
+ clockformatted_1.push(textfmt.format({hour: 1,minute: 1,second: 1}).toString());
+ clockformatted_9.push(textfmt.format({hour: 9,minute: 9,second: 9}).toString());
+ }
+
+ test.equal(textformatted_1[0], '1 वर्ष, 1 महिना, 1 हप्ता,1 दिन');
+ test.equal(textformatted_1[1], '1 वर्ष, 1 महिना, 1 हप्ता, 1 दिन');
+ test.equal(textformatted_1[2], '1 वर्ष1 महिना1 हप्ता1 दिन');
+ test.equal(textformatted_1[3], '1 वर्ष1 महिना1 हप्ता1 दिन');
+
+ test.equal(textformatted_9[0], '9 वर्ष, 9 महिना, 9 हप्ता,9 दिन');
+ test.equal(textformatted_9[1], '9 वर्ष, 9 महिना, 9 हप्ता, 9 दिन');
+ test.equal(textformatted_9[2], '9 वर्ष9 महिना9 हप्ता9 दिन');
+ test.equal(textformatted_9[3], '9 वर्ष9 महिना9 हप्ता9 दिन');
+
+ test.equal(clockformatted_1[0], '1 घण्टा, 1 मिनेट,1 सेकेन्ड');
+ test.equal(clockformatted_1[1], '1 घण्टा, 1 मिनेट, 1 सेकेन्ड');
+ test.equal(clockformatted_1[2], '1 घण्टा1 मिनेट1 सेकेन्ड');
+ test.equal(clockformatted_1[3], '1 घण्टा1 मिनेट1 सेकेन्ड');
+
+ test.equal(clockformatted_9[0], '9 घण्टा, 9 मिनेट,9 सेकेन्ड');
+ test.equal(clockformatted_9[1], '9 घण्टा, 9 मिनेट, 9 सेकेन्ड');
+ test.equal(clockformatted_9[2], '9 घण्टा9 मिनेट9 सेकेन्ड');
+ test.equal(clockformatted_9[3], '9 घण्टा9 मिनेट9 सेकेन्ड');
test.done();
},
diff --git a/js/test/number/testcurrency.js b/js/test/number/testcurrency.js
index 74ea54ef02..377a62bfbb 100644
--- a/js/test/number/testcurrency.js
+++ b/js/test/number/testcurrency.js
@@ -1,7 +1,7 @@
/*
* testcurrency.js - test the currency routines
*
- * Copyright © 2012-2017, JEDLSoft
+ * Copyright © 2012-2017, 2020 JEDLSoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1910,7 +1910,71 @@ module.exports.testcurrency = {
test.ok(info !== null);
test.equal(info.getCurrency(), "MMK");
+ test.done();
+ },
+ testCurrency_be_BY: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("be-BY");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "BYN");
+ test.done();
+ },
+ testCurrency_ne_NP: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ne-NP");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "NPR");
+ test.done();
+ },
+ testCurrency_lo_LA: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("lo-LA");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "LAK");
+ test.done();
+ },
+ testCurrency_ky_KG: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ky-KG");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "KGS");
+ test.done();
+ },
+ testCurrency_ca_AD: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ca-AD");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "EUR");
+
+ test.done();
+ },
+ testCurrency_ca_ES: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("ca-ES");
+ test.ok(info !== null);
+ test.equal(info.getCurrency(), "EUR");
+ test.done();
+ },
+ testCurrency_gl_ES: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("gl-ES");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "EUR");
+ test.done();
+ },
+ testCurrency_hy_AM: function(test) {
+ test.expect(2);
+ var info = new LocaleInfo("hy-AM");
+ test.ok(info !== null);
+
+ test.equal(info.getCurrency(), "AMD");
test.done();
}
};
diff --git a/js/test/number/testnumfmt.js b/js/test/number/testnumfmt.js
index 05d127bbff..b1c9301700 100644
--- a/js/test/number/testnumfmt.js
+++ b/js/test/number/testnumfmt.js
@@ -1,7 +1,11 @@
/*
* testnumfmt.js - test the number formatter object
*
+<<<<<<< HEAD
* Copyright © 2012-2018 2020 JEDLSoft
+=======
+ * Copyright © 2012-2018, 2020 JEDLSoft
+>>>>>>> development
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -6892,7 +6896,28 @@ module.exports.testnumfmt = {
maxFractionDigits: 2
});
test.ok(fmt);
- test.equal(fmt.format(-123.57), "-၁၂၃.၅၇");
+ test.equal(fmt.format(57.8), "၅၇.၈");
+ test.done();
+ },
+ testNumFmtPercentageFormatRegular_my_MM: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ locale: "my-MM",
+ useNative: true,
+ type: "percentage"
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(-57.8), '-၅၇.၈%');
+ test.done();
+ },
+ testNumFmtPercentageNativeFormatRegular_my_MM: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ locale: "my-MM",
+ type: "percentage"
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(-57.8), '-၅၇.၈%');
test.done();
},
testNumFmtCurrencyFormatNativeCurrencyForLocale_my_MM1: function(test) {
@@ -6938,28 +6963,97 @@ module.exports.testnumfmt = {
type: "percentage"
});
test.ok(fmt);
- test.equal(fmt.format(57.8), "੫੭.੮%");
+ test.equal(fmt.format(-1234568.78), "-၁,၂၃၄,၅၆၈.၇၈%");
test.done();
},
- testNumFmtPercentageFormatRegular_my_MM: function(test) {
+
+ //test cases for ne-NP
+ testNumFmt_ne_NP: function(test) {
test.expect(2);
var fmt = new NumFmt({
- locale: "my-MM",
+ locale: "ne-NP",
+ maxFractionDigits: 2
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(1234567.89), "१,२३४,५६७.८९");
+ test.done();
+ },
+ testNumFmtNative_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ locale: "ne-NP",
+ useNative: true,
+ maxFractionDigits: 2
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(-123.57), "-१२३.५७");
+ test.done();
+ },
+
+ testNumFmtCurrencyFormatNativeCurrencyForLocale_ne_NP1: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ type: "currency",
+ locale: "ne-NP",
+ useNative: true,
+ currency: "NPR"
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(100110.57), "Rs १००,११०.५७");
+ test.done();
+ },
+ testNumFmtCurrencyFormatNegativeNativeCurrencyForLocale_ne_NP1: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ type: "currency",
+ locale: "ne-NP",
+ useNative: true,
+ currency: "NPR"
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(-100110.57), "-Rs १००,११०.५७");
+ test.done();
+ },
+ testNumFmtCurrencyFormatCorrectCurrencyForLocale_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ type: "currency",
+ locale: "ne-NP",
+ currency: "NPR"
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(100110.57), "Rs १००,११०.५७");
+ test.done();
+ },
+ testNumFmtPercentageFormatRegular_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ locale: "ne-NP",
useNative: true,
type: "percentage"
});
test.ok(fmt);
- test.equal(fmt.format(-57.8), '-၅၇.၈%');
+ test.equal(fmt.format(57.8), "५७.८%");
test.done();
},
- testNumFmtPercentageNativeFormatRegular_my_MM: function(test) {
+ testNumFmtPercentageNativeFormatRegular_ne_NP: function(test) {
test.expect(2);
var fmt = new NumFmt({
- locale: "my-MM",
+ locale: "ne-NP",
type: "percentage"
});
test.ok(fmt);
- test.equal(fmt.format(-57.8), '-၅၇.၈%');
+ test.equal(fmt.format(-57.8), "-५७.८%");
+ test.done();
+ },
+ testNumFmtPercentageNativeFormatNegative_ne_NP: function(test) {
+ test.expect(2);
+ var fmt = new NumFmt({
+ locale: "ne-NP",
+ type: "percentage"
+ });
+ test.ok(fmt);
+ test.equal(fmt.format(57.8), "५७.८%");
test.done();
}
};
diff --git a/js/test/number/testnumfmt2.js b/js/test/number/testnumfmt2.js
index addcef731b..05ad77d65a 100644
--- a/js/test/number/testnumfmt2.js
+++ b/js/test/number/testnumfmt2.js
@@ -1,5 +1,5 @@
/*
- * testnumfmt2.js
+ * testnumfmt2.js - test the number formatter object
*
* Copyright © 2019-2020, JEDLSoft
*
@@ -3774,10 +3774,141 @@ module.exports.testnumfmt2 = {
test.equal(curfmt.format(57.05), "57,05 ₾"); //GEL
test.done();
},
+ testNumFmt_be_BY: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("be-BY");
+ var fmt = new NumFmt({locale:"be-BY", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), " ");
+ test.equal(fmt.format(123456789.45), "123 456 789,45");
+
+ var pctfmt = new NumFmt({locale:"be-BY", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n} %");
+ test.equal(li.getNegativePercentageFormat(), "-{n} %");
+ test.equal(pctfmt.format(34), "34 %");
+
+ var curfmt = new NumFmt({locale: "be-BY", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{n} {s}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}");
+ test.equal(curfmt.format(57.05), "57,05 р."); //BYN
+ test.done();
+ },
+ testNumFmt_lo_LA: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("lo-LA");
+ var fmt = new NumFmt({locale:"lo-LA", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), ".");
+ test.equal(fmt.format(123456789.45), "123.456.789,45");
+ var pctfmt = new NumFmt({locale:"lo-LA", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n}%");
+ test.equal(li.getNegativePercentageFormat(), "-{n}%");
+ test.equal(pctfmt.format(34), "34%");
+
+ var curfmt = new NumFmt({locale: "lo-LA", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{s}{n}");
+ test.equal(li.getCurrencyFormats().commonNegative, "{s}-{n}");
+ test.equal(curfmt.format(57.05), "₭57"); //LAK
+ test.done();
+ },
+ testNumFmt_ky_KG: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("ky-KG");
+ var fmt = new NumFmt({locale:"ky-KG", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), " ");
+ test.equal(fmt.format(123456789.45), "123 456 789,45");
+
+ var pctfmt = new NumFmt({locale:"ky-KG", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n}%");
+ test.equal(li.getNegativePercentageFormat(), "-{n}%");
+ test.equal(pctfmt.format(34), "34%");
+
+ var curfmt = new NumFmt({locale: "ky-KG", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{n} {s}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}");
+ test.equal(curfmt.format(57.05), "57,05 лв"); //KGS
+ test.done();
+ },
+ testNumFmt_ca_AD: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("ca-AD");
+ var fmt = new NumFmt({locale:"ca-AD", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), ".");
+ test.equal(fmt.format(123456789.45), "123.456.789,45");
+
+ var pctfmt = new NumFmt({locale:"ca-AD", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n}%");
+ test.equal(li.getNegativePercentageFormat(), "-{n}%");
+ test.equal(pctfmt.format(34), "34%");
+ var curfmt = new NumFmt({locale: "ca-AD", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{n} {s}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}");
+ test.equal(curfmt.format(57.05), "57,05 €"); //EUR
+ test.done();
+ },
+ testNumFmt_ca_ES: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("ca-ES");
+ var fmt = new NumFmt({locale:"ca-ES", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), ".");
+ test.equal(fmt.format(123456789.45), "123.456.789,45");
+ var pctfmt = new NumFmt({locale:"ca-ES", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n}%");
+ test.equal(li.getNegativePercentageFormat(), "-{n}%");
+ test.equal(pctfmt.format(34), "34%");
+
+ var curfmt = new NumFmt({locale: "ca-ES", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{n} {s}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}");
+ test.equal(curfmt.format(57.05), "57,05 €"); //EUR
+ test.done();
+ },
+ testNumFmt_hy_AM: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("hy-AM");
+ var fmt = new NumFmt({locale:"hy-AM", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), " ");
+ test.equal(fmt.format(123456789.45), "123 456 789,45");
+
+ var pctfmt = new NumFmt({locale:"hy-AM", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n}%");
+ test.equal(li.getNegativePercentageFormat(), "-{n}%");
+ test.equal(pctfmt.format(34), "34%");
+
+ var curfmt = new NumFmt({locale: "hy-AM", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{n} {s}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}");
+ test.equal(curfmt.format(57.05), "57,05 դր.");
+ test.done();
+ },
+ testNumFmt_gl_ES: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("gl-ES");
+ var fmt = new NumFmt({locale:"gl-ES", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ",");
+ test.equal(li.getGroupingSeparator(), ".");
+ test.equal(fmt.format(123456789.45), "123.456.789,45");
+
+ var pctfmt = new NumFmt({locale:"gl-ES", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n} %");
+ test.equal(li.getNegativePercentageFormat(), "-{n} %");
+ test.equal(pctfmt.format(34), "34 %");
+
+ var curfmt = new NumFmt({locale: "gl-ES", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{n} {s}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{n} {s}");
+ test.equal(curfmt.format(57.05), "57,05 €");
+ test.done();
+ },
testNumFmt_eu_ES: function(test) {
test.expect(9);
var li = new LocaleInfo("eu-ES");
var fmt = new NumFmt({locale:"eu-ES", type:"standard", useNative:false});
+
test.equal(li.getDecimalSeparator(), ",");
test.equal(li.getGroupingSeparator(), ".");
test.equal(fmt.format(123456789.45), "123.456.789,45");
@@ -3790,7 +3921,28 @@ module.exports.testnumfmt2 = {
var curfmt = new NumFmt({locale: "eu-ES", type: "currency", useNative:false, currency:li.getCurrency()});
test.equal(li.getCurrencyFormats().common, "{n} {s}");
test.equal(li.getCurrencyFormats().commonNegative, "−{n} {s}");
+
test.equal(curfmt.format(57.05), "57,05 €");
+
+ test.done();
+ },
+ testNumFmt_ne_NP: function(test) {
+ test.expect(9);
+ var li = new LocaleInfo("ne-NP");
+ var fmt = new NumFmt({locale:"ne-NP", type:"standard", useNative:false});
+ test.equal(li.getDecimalSeparator(), ".");
+ test.equal(li.getGroupingSeparator(), ",");
+ test.equal(fmt.format(123456789.45), "123,456,789.45");
+
+ var pctfmt = new NumFmt({locale:"ne-NP", type:"percentage", useNative:false});
+ test.equal(li.getPercentageFormat(), "{n}%");
+ test.equal(li.getNegativePercentageFormat(), "-{n}%");
+ test.equal(pctfmt.format(34), "34%");
+
+ var curfmt = new NumFmt({locale: "ne-NP", type: "currency", useNative:false, currency:li.getCurrency()});
+ test.equal(li.getCurrencyFormats().common, "{s} {n}");
+ test.equal(li.getCurrencyFormats().commonNegative, "-{s} {n}");
+ test.equal(curfmt.format(57.05), "Rs 57.05"); //NPR
test.done();
},
testNumFmt_my_MM: function(test) {
diff --git a/js/test/root/testcountry.js b/js/test/root/testcountry.js
index 9deb2bdf43..179791fef4 100644
--- a/js/test/root/testcountry.js
+++ b/js/test/root/testcountry.js
@@ -1,7 +1,7 @@
/*
* testcountry.js - test the country routines
*
- * Copyright © 2017, JEDLSoft
+ * Copyright © 2017, 2020 JEDLSoft
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -172,6 +172,124 @@ module.exports.testcountry = {
test.equal(locale.toString(), "en-AU");
test.done();
},
+ testCountryLocale9: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "be-BY"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("MO"),"Макаа, САР (Кітай)" );
+ test.equal(ctry.getCode("Макаа, САР (Кітай)"), "MO");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "be-BY");
+ test.done();
+ },
+ testCountryLocale_lo_LA: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "lo-LA"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("MO"),"ມາກາວ ເຂດປົກຄອງພິເສດ ຈີນ" );
+ test.equal(ctry.getCode("ມາກາວ ເຂດປົກຄອງພິເສດ ຈີນ"), "MO");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "lo-LA");
+ test.done();
+ },
+ testCountryLocale_lo_LA2: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "lo-LA"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("KR"),"ເກົາຫລີໃຕ້" );
+ test.equal(ctry.getCode("ເກົາຫລີໃຕ້"), "KR");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "lo-LA");
+ test.done();
+ },
+
+ testCountryLocale_ky_KG: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "ky-KG"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("CH"),"Швейцария" );
+ test.equal(ctry.getCode("Швейцария"), "CH");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "ky-KG");
+ test.done();
+ },
+ testCountryLocale_ky_KG2: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "ky-KG"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("KR"),"Түштүк Корея" );
+ test.equal(ctry.getCode("Түштүк Корея"), "KR");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "ky-KG");
+ test.done();
+ },
+ testCountryLocale_ca_AD: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "ca-AD"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("MO"),"Macau (RAE Xina)");
+ test.equal(ctry.getCode("Macau (RAE Xina)"), "MO");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "ca-AD");
+ test.done();
+ },
+ testCountryLocale_ca_AD2: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "ca-AD"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("KR"),"Corea del Sud");
+ test.equal(ctry.getCode("Corea del Sud"), "KR");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "ca-AD");
+ test.done();
+ },
+ testCountryLocalehy_AM: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "hy-AM"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("MO"), "Չինաստանի Մակաո ՀՎՇ");
+ test.equal(ctry.getCode("Չինաստանի Մակաո ՀՎՇ"), "MO");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "hy-AM");
+ test.done();
+ },
+ testCountryLocalehy_AM2: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "hy-AM"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("KR"), 'Հարավային Կորեա');
+ test.equal(ctry.getCode('Հարավային Կորեա'), "KR");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "hy-AM");
+ test.done();
+ },
testCountryLocale10: function(test) {
test.expect(4);
var ctry = new Country({
@@ -212,6 +330,32 @@ module.exports.testcountry = {
test.done();
},
+ testCountryLocale_ne_NP: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "ne-NP"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("MO"),"(मकाउ चिनियाँ विशेष प्रशासनिक क्षेत्र");
+ test.equal(ctry.getCode("(मकाउ चिनियाँ विशेष प्रशासनिक क्षेत्र"), "MO");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "ne-NP");
+ test.done();
+ },
+ testCountryLocale_ne_NP2: function(test) {
+ test.expect(4);
+ var ctry = new Country({
+ locale: "ne-NP"
+ });
+ test.ok(ctry !== null);
+
+ test.equal(ctry.getName("KR"), 'दक्षिण कोरिया');
+ test.equal(ctry.getCode('दक्षिण कोरिया'), "KR");
+ var locale = ctry.getLocale();
+ test.equal(locale.toString(), "ne-NP");
+ test.done();
+ },
testCountryGetByCodeUnknown: function(test) {
try {
var ctry = new Country();
diff --git a/js/test/root/testlocaleinfo.js b/js/test/root/testlocaleinfo.js
index 072ac620cd..5c9260df6e 100644
--- a/js/test/root/testlocaleinfo.js
+++ b/js/test/root/testlocaleinfo.js
@@ -13389,6 +13389,56 @@ module.exports.testlocaleinfo = {
test.equal(info.getPaperSize(), "A4");
test.done();
},
+ testLocaleInfoQuotation_be_BY: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("be-BY");
+ test.ok(info !== null);
+
+ test.equal(info.getDelimiterQuotationStart(), "«");
+ test.equal(info.getDelimiterQuotationEnd(), "»");
+ test.equal(info.getPaperSize(), "A4");
+ test.done();
+ },
+ testLocaleInfoQuotation_lo_LA: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("lo-LA");
+ test.ok(info !== null);
+
+ test.equal(info.getDelimiterQuotationStart(), "“");
+ test.equal(info.getDelimiterQuotationEnd(), "”");
+ test.equal(info.getPaperSize(), "A4");
+ test.done();
+ },
+ testLocaleInfoQuotation_ky_KG: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("ky-KG");
+ test.ok(info !== null);
+
+ test.equal(info.getDelimiterQuotationStart(), "«");
+ test.equal(info.getDelimiterQuotationEnd(), "»");
+ test.equal(info.getPaperSize(), "A4");
+ test.done();
+ },
+ testLocaleInfoQuotation_hy_AM: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("hy-AM");
+ test.ok(info !== null);
+
+ test.equal(info.getDelimiterQuotationStart(), "«");
+ test.equal(info.getDelimiterQuotationEnd(), "»");
+ test.equal(info.getPaperSize(), "A4");
+ test.done();
+ },
+ testLocaleInfoQuotation_gl_ES: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("gl-ES");
+ test.ok(info !== null);
+
+ test.equal(info.getDelimiterQuotationStart(), "“");
+ test.equal(info.getDelimiterQuotationEnd(), "”");
+ test.equal(info.getPaperSize(), "A4");
+ test.done();
+ },
testLocaleInfoQuotation_eu_ES: function(test) {
test.expect(4);
var info = new LocaleInfo("eu-ES");
@@ -13404,6 +13454,16 @@ module.exports.testlocaleinfo = {
var info = new LocaleInfo("my-MM");
test.ok(info !== null);
+ test.equal(info.getDelimiterQuotationStart(), "“");
+ test.equal(info.getDelimiterQuotationEnd(), "”");
+ test.equal(info.getPaperSize(), "A4");
+ test.done();
+ },
+ testLocaleInfoQuotation_ne_NP: function(test) {
+ test.expect(4);
+ var info = new LocaleInfo("ne-NP");
+ test.ok(info !== null);
+
test.equal(info.getDelimiterQuotationStart(), "“");
test.equal(info.getDelimiterQuotationEnd(), "”");
test.equal(info.getPaperSize(), "A4");
diff --git a/js/test/root/testlocalematch.js b/js/test/root/testlocalematch.js
index 2be53abca7..19e5f2e470 100644
--- a/js/test/root/testlocalematch.js
+++ b/js/test/root/testlocalematch.js
@@ -1106,6 +1106,138 @@ module.exports.testlocalematch = {
test.equal(locale.getSpec(), "ka-Geor-GE");
test.done();
},
+ testLocaleMatcherGetLikelyLocaleByLocaleCode63: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "be-BY"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "be-Cyrl-BY");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode64: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "be"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "be-Cyrl-BY");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode65: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "BY"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "be-Cyrl-BY");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode_lo: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "lo"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "lo-Laoo-LA");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode_ky: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ky"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ky-Cyrl-KG");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode_KG: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "KG"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ky-Cyrl-KG");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode_ca: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ca"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ca-Latn-ES");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCodehy: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "hy"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "hy-Armn-AM");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCodehy2: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "AM"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "hy-Armn-AM");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCodehy3: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "Armn-AM"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "hy-Armn-AM");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode68: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "gl-ES"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "gl-Latn-ES");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode69: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "gl"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "gl-Latn-ES");
+ test.done();
+ },
testLocaleMatcherGetLikelyLocaleByLocaleCode66: function(test) {
test.expect(3);
var lm = new LocaleMatcher({
@@ -1150,7 +1282,28 @@ module.exports.testlocalematch = {
test.equal(locale.getSpec(), "my-Mymr-MM");
test.done();
},
-
+ testLocaleMatcherGetLikelyLocaleByLocaleCode_ne: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ne"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ne-Deva-NP");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleByLocaleCode_ne_NP: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ne-NP"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocale();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ne-Deva-NP");
+ test.done();
+ },
testLocaleMatcherMatchExactFullLocale: function(test) {
test.expect(2);
var lm = new LocaleMatcher({
@@ -1617,6 +1770,39 @@ module.exports.testlocalematch = {
test.equal(locale.getSpec(), "ka-GE");
test.done();
},
+ testLocaleMatcherGetLikelyLocaleMinimalByLanguage4: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "be"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "be-BY");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalByLanguage_ky: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ky"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ky-Cyrl-KG");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalByLanguage6: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "gl"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "gl-ES");
+ test.done();
+ },
testLocaleMatcherGetLikelyLocaleMinimalByLanguage5: function(test) {
test.expect(3);
var lm = new LocaleMatcher({
@@ -1677,6 +1863,18 @@ module.exports.testlocalematch = {
test.done();
},
+ testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForLanguage_ne: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ne"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ne-NP");
+ test.done();
+ },
+
testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForCountry: function(test) {
test.expect(3);
var lm = new LocaleMatcher({
@@ -1688,6 +1886,29 @@ module.exports.testlocalematch = {
test.equal(locale.getSpec(), "fi-FI"); // default is Latin
test.done();
},
+ testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForCountry_NP: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "NP"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ne-NP");
+ test.done();
+ },
+
+ testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForCountry_LA: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "LA"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "lo-LA");
+ test.done();
+ },
testLocaleMatcherGetLikelyLocaleMinimalNonDefaultScriptForLanguage1: function(test) {
test.expect(3);
@@ -1782,7 +2003,29 @@ module.exports.testlocalematch = {
test.equal(locale.getSpec(), "my-MM");
test.done();
},
+ testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForCountry_KG: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "KG"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ky-Cyrl-KG");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForCountry_AD: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "AD"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ca-AD");
+ test.done();
+ },
testLocaleMatcherGetLikelyLocaleMinimalDefaultLocaleForScript1: function(test) {
test.expect(3);
var lm = new LocaleMatcher({
@@ -1843,6 +2086,18 @@ module.exports.testlocalematch = {
test.done();
},
+ testLocaleMatcherGetLikelyLocaleMinimalNonDefaultLocaleForScript_Laoo: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "Laoo"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "lo-LA");
+ test.done();
+ },
+
testLocaleMatcherGetLikelyLocaleMinimalDefaultLocaleForLangScript1: function(test) {
test.expect(3);
var lm = new LocaleMatcher({
@@ -1923,5 +2178,49 @@ module.exports.testlocalematch = {
test.ok(typeof(locale) !== "undefined");
test.equal(locale.getSpec(), "my-MM");
test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalNonDefaultLocaleForLangScript_ne_Deva: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "ne-Deva"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "ne-NP");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalNonDefaultLocaleForLangScript_laoo: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "lo-Laoo"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "lo-LA");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalNonDefaultLocalehyAM: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "hy-AM"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "hy-AM");
+ test.done();
+ },
+ testLocaleMatcherGetLikelyLocaleMinimalNonDefaultLocalehyAM2: function(test) {
+ test.expect(3);
+ var lm = new LocaleMatcher({
+ locale: "hy-Armn"
+ });
+ test.ok(typeof(lm) !== "undefined");
+ var locale = lm.getLikelyLocaleMinimal();
+ test.ok(typeof(locale) !== "undefined");
+ test.equal(locale.getSpec(), "hy-AM");
+ test.done();
}
};
diff --git a/js/test/root/testscriptinfo.js b/js/test/root/testscriptinfo.js
index e352a3b604..3ce7f63cfd 100644
--- a/js/test/root/testscriptinfo.js
+++ b/js/test/root/testscriptinfo.js
@@ -2186,6 +2186,76 @@ module.exports.testscriptinfo = {
test.equal(scinfo.getScriptDirection(), "ltr");
test.done();
},
+ testScriptInfo_be_BY: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("be-BY");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Cyrl");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
+ testScriptInfo_lo_LA: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("lo-LA");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Laoo");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
+ testScriptInfo_ky_KG: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("ky-KG");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Cyrl");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
+ testScriptInfo_ca_AD: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("ca-AD");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Latn");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
+ testScriptInfo_es_ES: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("ca-ES");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Latn");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
+ testScriptInfo_hy_AM: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("hy-AM");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Armn");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
+ testScriptInfo_gl_ES: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("gl-ES");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Latn");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
+ },
testScriptInfo_eu_ES: function(test) {
test.expect(4);
var li = new LocaleInfo("eu-ES");
@@ -2205,5 +2275,15 @@ module.exports.testscriptinfo = {
test.equal(li.getScript(), "Mymr");
test.equal(scinfo.getScriptDirection(), "ltr");
test.done();
+ },
+ testScriptInfo_ne_NP: function(test) {
+ test.expect(4);
+ var li = new LocaleInfo("ne-NP");
+ var scinfo = new ScriptInfo(li.getScript());
+ test.ok(li !== null);
+ test.ok(scinfo !== null);
+ test.equal(li.getScript(), "Deva");
+ test.equal(scinfo.getScriptDirection(), "ltr");
+ test.done();
}
-};
+};
\ No newline at end of file
diff --git a/js/test/root/teststrings.js b/js/test/root/teststrings.js
index d83b592024..c6af593467 100644
--- a/js/test/root/teststrings.js
+++ b/js/test/root/teststrings.js
@@ -3263,7 +3263,68 @@ module.exports.teststrings = {
test.equal(str.formatChoice(1), "There items are one");
test.done();
},
+ testStringFormatChoiceCharClasses25: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(0), "There are no items.");
+ test.done();
+ },
+ testStringFormatChoiceCharClasses26: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceCharClasses32: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("eu-ES");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceCharClasses27: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(3), "The items are few");
+ test.done();
+ },
+ testStringFormatChoiceCharClasses28: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(100), "The items are many");
+ test.done();
+ },
+ testStringFormatChoiceCharClasses29: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(8), "The items are many");
+ test.done();
+ },
+
testStringFormatChoiceCharClasses30: function(test) {
+
test.expect(2);
var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
str.setLocale("eu-ES");
@@ -3273,13 +3334,21 @@ module.exports.teststrings = {
test.equal(str.formatChoice(1), "There items are one");
test.done();
},
- testStringFormatChoiceCharClasses31: function(test) {
+ testStringFormatChoiceCharClasses33: function(test) {
test.expect(2);
var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
str.setLocale("eu-ES");
test.ok(str !== null);
+ test.equal(str.formatChoice(11), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceCharClasses31: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("eu-ES");
+ test.ok(str !== null);
test.equal(str.formatChoice(16), "Default items");
test.done();
},
@@ -3293,7 +3362,7 @@ module.exports.teststrings = {
test.equal(str.formatChoice(1), "There items are one");
test.done();
},
- testStringFormatChoiceCharClasses_my_MM: function(test) {
+ testStringFormatChoiceCharClasses_my_MM2: function(test) {
test.expect(2);
var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
str.setLocale("my-MM");
@@ -3446,6 +3515,81 @@ module.exports.teststrings = {
test.equal(str.formatChoice(1), "There items are one");
test.done();
},
+ testStringFormatChoiceCharClassesComplex_ne_NP: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ne-NP");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplex_ne_NP2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ne-NP");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(11), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplex_lo_LA: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("lo-LA");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplex_lo_LA2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("lo-LA");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(13), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplex_ca_AD: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ca-AD");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplexhyAM: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("hy-AM");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplex_ca_AD2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ca-AD");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(15), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceCharClassesComplexhyAM2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("hy-AM");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(15), "Default items");
+ test.done();
+ },
testStringFormatChoiceDecimal1: function(test) {
test.expect(2);
@@ -3711,16 +3855,113 @@ module.exports.teststrings = {
test.equal(str.formatChoice(1.7), "Default items");
test.done();
},
+ testStringFormatChoiceDecimal26: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(21.0), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceDecimal27: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(33.0), "The items are few");
+ test.done();
+ },
+ testStringFormatChoiceDecimal28: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("be-BY");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(100.1), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceDecimal_lo_LA: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("lo-LA");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(3.5), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceDecimal_ca_AD: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ca-AD");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1.7), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceDecimal_ca_AD2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ca-AD");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(10.0), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceDecimal_ca_ES: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ca-ES");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(2.7), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceDecimal_ca_ES2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ca-ES");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(14.4), "Default items");
+ test.done();
+ },
+ testStringFormatChoiceDecimalhyAM: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("hy-AM");
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1.0), "There items are one");
+ test.done();
+ },
testStringFormatChoiceDecimal29: function(test) {
test.expect(2);
var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
str.setLocale("eu-ES");
-
test.ok(str !== null);
test.equal(str.formatChoice(1.0), "There items are one");
test.done();
},
+ testStringFormatChoiceDecimalhyAM2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("hy-AM");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(3.5), "Default items");
+ test.done();
+ },
testStringFormatChoiceDecimal30: function(test) {
test.expect(2);
var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
@@ -3750,5 +3991,25 @@ module.exports.teststrings = {
test.equal(str.formatChoice(3.7), "Default items");
test.done();
+ },
+ testStringFormatChoiceDecimal_ne_NP: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ne-NP");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(1.0), "There items are one");
+ test.done();
+ },
+ testStringFormatChoiceDecimal_ne_NP2: function(test) {
+ test.expect(2);
+ var str = new IString("0#There are no items.|one#There items are one|few#The items are few|many#The items are many|#Default items");
+ str.setLocale("ne-NP");
+
+ test.ok(str !== null);
+
+ test.equal(str.formatChoice(4.7), "Default items");
+ test.done();
}
};
\ No newline at end of file
diff --git a/js/test/strings-ext/testSuite.html b/js/test/strings-ext/testSuite.html
index a3be53486c..f1db51036c 100644
--- a/js/test/strings-ext/testSuite.html
+++ b/js/test/strings-ext/testSuite.html
@@ -1,7 +1,7 @@