diff --git a/.gitignore b/.gitignore index dc2f2edcc7..ae0f99a943 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ qt/FileReader/release/ qt/output/ /node_modules/ +/dist/ diff --git a/build.properties b/build.properties index 7d6916ee45..dcd7ae9c9a 100644 --- a/build.properties +++ b/build.properties @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -version=14.4.0 +version=14.5.0 diff --git a/docs/QtTest.md b/docs/QtTest.md index 78b4b2db75..723732ed3f 100644 --- a/docs/QtTest.md +++ b/docs/QtTest.md @@ -6,12 +6,27 @@ In order to run a test on QT/QML environment, You need to some setting in Advanc You need to install [QT](https://www.qt.io/download) on your machine first. We've confirmed that iLib works in QT 5.9. The latest version of QT is not guaranteed yet. I recommend installing version under `QT 5.9` and `QtQuick 2.5+` ##### 2. Modify qt/build.properties file -When you checkout iLib sources, Default values in `qt/build.properties` is `QTBIN=/opt/qt55/bin` If you install different location, You need to modify this file. +When you checkout iLib sources, Default values in `qt/build.properties` is `QTBIN=/opt/qt55/bin` If you install different locations, You need to modify this file. + +##### Additional Information +If your machine still doesn't point QT where you want, Please modify `default.conf` following way. + +[qtchooser](https://www.systutorials.com/docs/linux/man/1-qtchooser/): - a wrapper used to select between Qt development binary versions + +a. Check current system status first by qtchooser command +~~~~~ +> qtchooser –print-env +~~~~~ +b. Modify `defult.conf` +It's System-wide configuration file. If a `default.conf` is provided, the settings from it will be automatically used in case nothing else is selected. +~~~~~ +> sudo vi /usr/lib/x86_64-linux-gnu/qtchooser/default.conf +~~~~~ ##### 3. Run Qt/QML Test by executing ant Executing below command under qt/ directory. ~~~~~ -ant test.qt.nodeunit +> ant test.qt.nodeunit ~~~~~ ### Trouble Shooting ### @@ -24,8 +39,8 @@ ant test.qt.nodeunit You might need to install package below: ~~~~~ - sudo apt-get install libnetpbm10-dev - sudo apt-get install libglu1-mesa-dev + > sudo apt-get install libnetpbm10-dev + > sudo apt-get install libglu1-mesa-dev ~~~~~ 2. When you faced errors as below, diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index e79cefaa21..36c1c2618a 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -1,6 +1,29 @@ Release Notes for Version 14 ============================ +Build 008 +------- +Published as version 14.5.0 + +New Features: +* Added missing methods to the IString classes to echo all the methods on the intrinsic string class + * Added methods that have been added in the last few years which some engines define and others do not + * Delegates to the string class. Does not offer a polyfill yet. + * Methods added are: matchAll, endsWith, startsWith, includes, normalize, padEnd, + padStart, repeat, toLocaleLowerCase, toLocaleUpperCase, trim, trimEnd, trimRight, + trimStart, trimLeft. + * Defined the "length" property so that it returns the string's length like the intrinsic strings do + * Added unit tests that only test the new methods if the underlying string class implements each new + method. +* Added a "familiar" style to the name formatter + * This is as familiar as you can get and yet not be rude to a stranger for each locale. For example, in + English, you would use someone's given name, but in Japan, you would use the full name with honorific. + +Bug Fixes: +* Updated to IANA time zone data 2019c +* Updated the Korean Name Formatting component per style. Including 'suffix' is more natural than having a 'prefix' or 'honorific'. +* Added missing likelylocale for `hr-ME`. + Build 007 ------- Published as version 14.4.0 diff --git a/docs/index.md b/docs/index.md index 60d2ee0007..ce01b3fcb0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -23,15 +23,17 @@ Hello, and welcome to the iLib project! * [Updating the time zone information](tutorial/timezone.md) * [Running unit test on QT/QML](QtTest.md) * API Reference: - * [10.0](http://www.translationcircle.com/ilib/doc/10.0/jsdoc/) - * [11.0](http://www.translationcircle.com/ilib/doc/11.0/jsdoc/) - * [12.0](http://www.translationcircle.com/ilib/doc/jsdoc/) (latest stable) - * [latest](http://www.translationcircle.com/ilib/doc/jsdoc/) (latest development release) + * [10.0](https://ilib-js.github.io/iLib/docs/api/10.0/jsdoc/index.html) + * [11.0](https://ilib-js.github.io/iLib/docs/api/11.0/jsdoc/index.html) + * [12.0](https://ilib-js.github.io/iLib/docs/api/12.0/jsdoc/index.html) + * [13.0](https://ilib-js.github.io/iLib/docs/api/13.0/jsdoc/index.html) + * [14.0](https://ilib-js.github.io/iLib/docs/api/jsdoc/index.html) (latest stable) * Javadocs: - * [10.0](http://www.translationcircle.com/ilib/doc/10.0/javadoc/) - * [11.0](http://www.translationcircle.com/ilib/doc/11.0/javadoc/) - * [12.0](http://www.translationcircle.com/ilib/doc/javadoc/) (latest stable) - * [latest](http://www.translationcircle.com/ilib/doc/javadoc/) (latest development release) + * [10.0](https://ilib-js.github.io/iLib/docs/api/10.0/javadoc/index.html) + * [11.0](https://ilib-js.github.io/iLib/docs/api/11.0/javadoc/index.html) + * [12.0](https://ilib-js.github.io/iLib/docs/api/12.0/javadoc/index.html) + * [13.0](https://ilib-js.github.io/iLib/docs/api/13.0/javadoc/index.html) + * [14.0](https://ilib-js.github.io/iLib/docs/api/javadoc/index.html) (latest stable) * [FAQ](FAQ.md) * [Demo](http://www.translationcircle.com/ilib/demo/) diff --git a/js/build.xml b/js/build.xml index 41ae0a4df0..664077e72d 100644 --- a/js/build.xml +++ b/js/build.xml @@ -51,8 +51,8 @@ limitations under the License. - - + + diff --git a/js/data/locale/cs/name.json b/js/data/locale/cs/name.json index 5a74f077e2..2391d6cdaf 100644 --- a/js/data/locale/cs/name.json +++ b/js/data/locale/cs/name.json @@ -1,5 +1,8 @@ { "format": "{prefix} {givenName} {middleName} {familyName} {suffix}", + "components": { + "familiar": "pf" + }, "sortByHeadWord": false, "nameStyle": "western", "conjunctions": { diff --git a/js/data/locale/de/name.json b/js/data/locale/de/name.json index 3b3f4d1034..64df9133ce 100644 --- a/js/data/locale/de/name.json +++ b/js/data/locale/de/name.json @@ -1,11 +1,14 @@ { - "sortByHeadWord": true, - "conjunctions": { - "and1": "und", - "and2": "und", - "or1": "oder", - "or2": "oder" - }, + "sortByHeadWord": true, + "components": { + "familiar": "pf" + }, + "conjunctions": { + "and1": "und", + "and2": "und", + "or1": "oder", + "or2": "oder" + }, "auxillaries": { "von": 1, "van": 1, @@ -269,14 +272,14 @@ "hochwohlgeborene", "hochwohlgeborener", "heiliger", - - "der", - "die", - "das", - "dem", - "den", - "und", - "oder" + + "der", + "die", + "das", + "dem", + "den", + "und", + "oder" ], "suffixes": [ "junior", @@ -297,6 +300,6 @@ "im ruhestand", "ba", "ma", - "phd" - ] + "phd" + ] } \ No newline at end of file diff --git a/js/data/locale/en/HK/name.json b/js/data/locale/en/HK/name.json index 5350d7e98f..0317172de2 100644 --- a/js/data/locale/en/HK/name.json +++ b/js/data/locale/en/HK/name.json @@ -1,7 +1,8 @@ { "order": "fgm", "components": { - "formal_long": "pgfm" + "formal_long": "pgfm", + "familiar": "gf" }, "useSpaces": true, "format": "{prefix} {familyName} {givenName} {middleName}{suffix}", diff --git a/js/data/locale/fr/name.json b/js/data/locale/fr/name.json index 3ba4d211d6..580d112feb 100644 --- a/js/data/locale/fr/name.json +++ b/js/data/locale/fr/name.json @@ -1,4 +1,7 @@ { + "components": { + "familiar": "pf" + }, "prefixes": [ "baron", "baronne", diff --git a/js/data/locale/ja/name.json b/js/data/locale/ja/name.json index ade2ed24fa..50389a6b0e 100644 --- a/js/data/locale/ja/name.json +++ b/js/data/locale/ja/name.json @@ -1,7 +1,8 @@ { "components": { "formal_short": "sf", - "formal_long": "sgf" + "formal_long": "sgf", + "familiar": "sgf" }, "format": "{prefix}{familyName}{middleName}{givenName}{suffix}", "nameStyle": "asian", diff --git a/js/data/locale/ko/name.json b/js/data/locale/ko/name.json index 3df9b1b004..e7c2cc726c 100644 --- a/js/data/locale/ko/name.json +++ b/js/data/locale/ko/name.json @@ -1,7 +1,11 @@ { "components": { - "formal_short": "pgf", - "formal_long": "pgf" + "medium": "gmf", + "long": "gmfs", + "full": "pgmfs", + "formal_short": "gfs", + "formal_long": "pgfs", + "familiar": "gfs" }, "useSpaces": false, "format": "{prefix} {familyName}{middleName}{givenName} {suffix}", @@ -19,270 +23,270 @@ ], "honorifics": [ "씨", - "군", - "양", - "님", - "닥터" + "군", + "양", + "님", + "닥터" ], - "suffixes": [ - "씨", - "군", - "양", - "님", - "주니어", - "연구원", - "주임", - "대리", - "과장", - "차장", - "계장", - "부장", - "상무", - "수석", - "책임", - "선임", - "박사", - "선배", - "후배", - "귀하", - "각하", - "전하", - "폐하", - "나으리", - "선생님", - "부인", - "대통령", - "부사장", - "총리", - "시장", - "지사", - "회장", - "대표", - "장관", - "목사님", - "요리사", - "코치", - "교수", - "여왕", - "왕자", - "공주", - "제독", - "감독관", - "교육감", - "보안관", - "관리자", - "형사", - "장교", - "선생님", - "레이디", - "아버지", - "어머니", - "동생", - "여동생", - "목사", - "이모", - "삼촌", - "할머니", - "할머니 ", - "할아버지", - "할아버지", - "사촌" - ], - "knownFamilyNames": { - "즙": "Chŭp", - "증": "Chŭng", - "망절": "Mangjŏl", - "소봉": "Sobong", - "누": "Nu", - "루": "Ru", - "교": "Kyo", - "군": "Kun", - "저": "Chŏ", - "강전": "Kangjŏn", - "삼": "Sam", - "어금": "Ŏgŭm", - "장곡": "Changgok", - "담": "Tam", - "묘": "Myo", - "준": "Chun", - "난": "Nan", - "란": "Ran", - "십": "Sip", - "개": "Kae", - "비": "Pi", - "뇌": "Noe", - "뢰": "Roe", - "학": "Hak", - "후": "Hu", - "돈": "Ton", - "애": "Ae", - "엽": "Yŏp", - "포": "P'o", - "곡": "Kok", - "탄": "T'an", - "환": "Hwan", - "운": "Un", - "만": "Man", - "자": "Cha", - "묵": "Muk", - "야": "Ya", - "요": "Yo", - "미": "Mi", - "수": "Su", - "동방": "Tubongbanua", - "매": "Mae", - "근": "Kŭn", - "궉": "Kwŏk", - "필": "P'il", - "영": "Yŏng", - "판": "P'an", - "해": "Hae", - "낭": "Nang", - "랑": "Rang", - "초": "Ch'o", - "내": "Nae", - "섭": "Sŏp", - "흥": "Hŭng", - "점": "Chŏm", - "궁": "Kung", - "풍": "P'ung", - "대": "Tae", - "평": "P'yŏng", - "아": "A", - "빙": "Ping", - "독고": "Tokko", - "화": "Hwa", - "종": "Chong", - "옹": "Ong", - "당": "Tang", - "창": "Ch'ang", - "순": "Sun", - "단": "Tan", - "견": "Kyŏn", - "서문": "Sŏmun", - "상": "Sang", - "간": "Kan", - "팽": "P'aeng", - "좌": "Chwa", - "갈": "Kal", - "승": "Sŭng", - "범": "Pŏm", - "선우": "Sŏnu", - "시": "Si", - "사공": "Sagong", - "제갈": "Chegal", - "온": "On", - "빈": "Pin", - "동": "Tong", - "음": "Ŭm", - "두": "Tu", - "감": "Kam", - "호": "Ho", - "계": "Kye", - "피": "P'i", - "형": "Hyŏng", - "태": "T'ae", - "목": "Mok", - "복": "Pok", - "가": "Ka", - "황보": "Hwangbo", - "부": "Pu", - "사": "Sa", - "봉": "Pong", - "예": "Ye", - "용": "Yong", - "룡": "Ryong", - "편": "P'yŏn", - "은": "Ŭn", - "경": "Kyŏng", - "어": "Ŏ", - "남궁": "Namgung", - "국": "Kuk", - "탁": "T'ak", - "모": "Mo", - "맹": "Maeng", - "인": "In", - "육": "Yuk", - "륙": "Ryuk", - "옥": "Ok", - "왕": "Wang", - "금": "Kŭm", - "반": "Pan", - "기": "Ki", - "명": "Myŏng", - "표": "P'yo", - "제": "Che", - "위": "Wi", - "길": "Kil", - "연": "Yŏn", - "련": "Ryŏn", - "마": "Ma", - "선": "Sŏn", - "설": "Sŏl", - "소": "So", - "석": "Sŏk", - "도": "To", - "추": "Ch'u", - "염": "Yŏm", - "렴": "Ryŏm", - "여": "Yŏ", - "려": "Ryŏ", - "함": "Ham", - "현": "Hyŏn", - "공": "Kong", - "임": "Im", - "천": "Ch'ŏn", - "채": "Ch'ae", - "방": "Pang", - "원": "Wŏn", - "변": "Pyŏn", - "엄": "Ŏm", - "지": "Chi", - "민": "Min", - "진": "Chin", - "나": "Na", - "라": "Ra", - "우": "U", - "차": "Ch'a", - "성": "Sŏng", - "곽": "Kwak", - "구": "Ku", - "하": "Ha", - "주": "Chu", - "심": "Sim", - "남": "Nam", - "노": "No", - "로": "Ro", - "허": "Hŏ", - "백": "Paek", - "배": "Pae", - "손": "Son", - "문": "Mun", - "고": "Ko", - "유": "Yu", - "류": "Ryu", - "양": "Yang", - "량": "Ryang", - "홍": "Hong", - "림": "Rim", - "안": "An", - "송": "Song", - "황": "Hwang", - "권": "Kwŏn", - "전": "Chŏn", - "서": "Sŏ", - "오": "O", - "한": "Han", - "신": "Sin", - "장": "Chang", - "윤": "Yun", - "강": "Kang", - "조": "Cho", - "최": "Ch'oe", - "정": "Chŏng", - "박": "Pak", - "이": "Yi", - "리": "Ri", - "김": "Kim" - } + "suffixes": [ + "씨", + "군", + "양", + "님", + "주니어", + "연구원", + "주임", + "대리", + "과장", + "차장", + "계장", + "부장", + "상무", + "수석", + "책임", + "선임", + "박사", + "선배", + "후배", + "귀하", + "각하", + "전하", + "폐하", + "나으리", + "선생님", + "부인", + "대통령", + "부사장", + "총리", + "시장", + "지사", + "회장", + "대표", + "장관", + "목사님", + "요리사", + "코치", + "교수", + "여왕", + "왕자", + "공주", + "제독", + "감독관", + "교육감", + "보안관", + "관리자", + "형사", + "장교", + "선생님", + "레이디", + "아버지", + "어머니", + "동생", + "여동생", + "목사", + "이모", + "삼촌", + "할머니", + "할머니 ", + "할아버지", + "할아버지", + "사촌" + ], + "knownFamilyNames": { + "즙": "Chŭp", + "증": "Chŭng", + "망절": "Mangjŏl", + "소봉": "Sobong", + "누": "Nu", + "루": "Ru", + "교": "Kyo", + "군": "Kun", + "저": "Chŏ", + "강전": "Kangjŏn", + "삼": "Sam", + "어금": "Ŏgŭm", + "장곡": "Changgok", + "담": "Tam", + "묘": "Myo", + "준": "Chun", + "난": "Nan", + "란": "Ran", + "십": "Sip", + "개": "Kae", + "비": "Pi", + "뇌": "Noe", + "뢰": "Roe", + "학": "Hak", + "후": "Hu", + "돈": "Ton", + "애": "Ae", + "엽": "Yŏp", + "포": "P'o", + "곡": "Kok", + "탄": "T'an", + "환": "Hwan", + "운": "Un", + "만": "Man", + "자": "Cha", + "묵": "Muk", + "야": "Ya", + "요": "Yo", + "미": "Mi", + "수": "Su", + "동방": "Tubongbanua", + "매": "Mae", + "근": "Kŭn", + "궉": "Kwŏk", + "필": "P'il", + "영": "Yŏng", + "판": "P'an", + "해": "Hae", + "낭": "Nang", + "랑": "Rang", + "초": "Ch'o", + "내": "Nae", + "섭": "Sŏp", + "흥": "Hŭng", + "점": "Chŏm", + "궁": "Kung", + "풍": "P'ung", + "대": "Tae", + "평": "P'yŏng", + "아": "A", + "빙": "Ping", + "독고": "Tokko", + "화": "Hwa", + "종": "Chong", + "옹": "Ong", + "당": "Tang", + "창": "Ch'ang", + "순": "Sun", + "단": "Tan", + "견": "Kyŏn", + "서문": "Sŏmun", + "상": "Sang", + "간": "Kan", + "팽": "P'aeng", + "좌": "Chwa", + "갈": "Kal", + "승": "Sŭng", + "범": "Pŏm", + "선우": "Sŏnu", + "시": "Si", + "사공": "Sagong", + "제갈": "Chegal", + "온": "On", + "빈": "Pin", + "동": "Tong", + "음": "Ŭm", + "두": "Tu", + "감": "Kam", + "호": "Ho", + "계": "Kye", + "피": "P'i", + "형": "Hyŏng", + "태": "T'ae", + "목": "Mok", + "복": "Pok", + "가": "Ka", + "황보": "Hwangbo", + "부": "Pu", + "사": "Sa", + "봉": "Pong", + "예": "Ye", + "용": "Yong", + "룡": "Ryong", + "편": "P'yŏn", + "은": "Ŭn", + "경": "Kyŏng", + "어": "Ŏ", + "남궁": "Namgung", + "국": "Kuk", + "탁": "T'ak", + "모": "Mo", + "맹": "Maeng", + "인": "In", + "육": "Yuk", + "륙": "Ryuk", + "옥": "Ok", + "왕": "Wang", + "금": "Kŭm", + "반": "Pan", + "기": "Ki", + "명": "Myŏng", + "표": "P'yo", + "제": "Che", + "위": "Wi", + "길": "Kil", + "연": "Yŏn", + "련": "Ryŏn", + "마": "Ma", + "선": "Sŏn", + "설": "Sŏl", + "소": "So", + "석": "Sŏk", + "도": "To", + "추": "Ch'u", + "염": "Yŏm", + "렴": "Ryŏm", + "여": "Yŏ", + "려": "Ryŏ", + "함": "Ham", + "현": "Hyŏn", + "공": "Kong", + "임": "Im", + "천": "Ch'ŏn", + "채": "Ch'ae", + "방": "Pang", + "원": "Wŏn", + "변": "Pyŏn", + "엄": "Ŏm", + "지": "Chi", + "민": "Min", + "진": "Chin", + "나": "Na", + "라": "Ra", + "우": "U", + "차": "Ch'a", + "성": "Sŏng", + "곽": "Kwak", + "구": "Ku", + "하": "Ha", + "주": "Chu", + "심": "Sim", + "남": "Nam", + "노": "No", + "로": "Ro", + "허": "Hŏ", + "백": "Paek", + "배": "Pae", + "손": "Son", + "문": "Mun", + "고": "Ko", + "유": "Yu", + "류": "Ryu", + "양": "Yang", + "량": "Ryang", + "홍": "Hong", + "림": "Rim", + "안": "An", + "송": "Song", + "황": "Hwang", + "권": "Kwŏn", + "전": "Chŏn", + "서": "Sŏ", + "오": "O", + "한": "Han", + "신": "Sin", + "장": "Chang", + "윤": "Yun", + "강": "Kang", + "조": "Cho", + "최": "Ch'oe", + "정": "Chŏng", + "박": "Pak", + "이": "Yi", + "리": "Ri", + "김": "Kim" + } } diff --git a/js/data/locale/localematch.json b/js/data/locale/localematch.json index 1659a659e5..640301b2ad 100644 --- a/js/data/locale/localematch.json +++ b/js/data/locale/localematch.json @@ -462,7 +462,7 @@ "Latn-MA": "fr-Latn-MA", "Latn-MC": "fr-Latn-MC", "Latn-MD": "ro-Latn-MD", - "Latn-ME": "sq-Latn-ME", + "Latn-ME": "hr-Latn-ME", "Latn-MF": "fr-Latn-MF", "Latn-MG": "mg-Latn-MG", "Latn-MH": "en-Latn-MH", @@ -2374,6 +2374,7 @@ "hr": "hr-Latn-HR", "hr-HR": "hr-Latn-HR", "hr-Latn": "hr-Latn-HR", + "hr-ME": "hr-Latn-ME", "hsb": "hsb-Latn-DE", "hsb-DE": "hsb-Latn-DE", "hsb-Latn": "hsb-Latn-DE", diff --git a/js/data/locale/name.json b/js/data/locale/name.json index d35e4a7b09..c2053571af 100644 --- a/js/data/locale/name.json +++ b/js/data/locale/name.json @@ -5,7 +5,8 @@ "long": "pgmf", "full": "pgmfs", "formal_short": "pf", - "formal_long": "pgf" + "formal_long": "pgf", + "familiar": "g" }, "format": "{prefix} {givenName} {middleName} {familyName}{suffix}", "sortByHeadWord": false, diff --git a/js/data/locale/sk/name.json b/js/data/locale/sk/name.json index ed0ec32921..a7b320e3bb 100644 --- a/js/data/locale/sk/name.json +++ b/js/data/locale/sk/name.json @@ -1,5 +1,8 @@ { "format": "{prefix} {givenName} {middleName} {familyName} {suffix}", + "components": { + "familiar": "pf" + }, "sortByHeadWord": false, "nameStyle": "western", "conjunctions": { diff --git a/js/data/locale/zh/name.json b/js/data/locale/zh/name.json index be1b73d4fc..8d3c0c4263 100644 --- a/js/data/locale/zh/name.json +++ b/js/data/locale/zh/name.json @@ -1,7 +1,8 @@ { "components": { "formal_short": "sf", - "formal_long": "sgf" + "formal_long": "sgf", + "familiar": "sf" }, "format": "{prefix}{familyName}{middleName}{givenName}{suffix}", "nameStyle": "asian", diff --git a/js/data/locale/zoneinfo/Pacific/Fiji.json b/js/data/locale/zoneinfo/Pacific/Fiji.json index 4bcb9959d0..d3f9f0bc97 100644 --- a/js/data/locale/zoneinfo/Pacific/Fiji.json +++ b/js/data/locale/zoneinfo/Pacific/Fiji.json @@ -1,14 +1,14 @@ { "e": { "m": 1, - "r": "0>13", + "r": "0>12", "t": "3:0" }, "f": "+12/+13", "o": "12:0", "s": { "m": 11, - "r": "0>1", + "r": "0>8", "t": "2:0", "v": "1:0" }, diff --git a/js/data/locale/zoneinfo/Pacific/Norfolk.json b/js/data/locale/zoneinfo/Pacific/Norfolk.json index 2db0b9e4d1..6451cbdb3a 100644 --- a/js/data/locale/zoneinfo/Pacific/Norfolk.json +++ b/js/data/locale/zoneinfo/Pacific/Norfolk.json @@ -1,6 +1,19 @@ { - "f": "+11", + "e": { + "c": "S", + "m": 4, + "r": "0>1", + "t": "3:0" + }, + "f": "+11/+12", "o": "11:0", + "s": { + "c": "D", + "m": 10, + "r": "0>1", + "t": "2:0", + "v": "1:0" + }, "c": "NF", "n": "Norfolk {c} Time" } \ No newline at end of file diff --git a/js/lib/IString.js b/js/lib/IString.js index 027bd70f77..073f308261 100644 --- a/js/lib/IString.js +++ b/js/lib/IString.js @@ -49,7 +49,7 @@ var IString = function (string) { this.str = string.toString(); } } else if (typeof(string) === 'string') { - this.str = new String(string); + this.str = String(string); // copy it } else { this.str = ""; } @@ -956,6 +956,15 @@ IString.prototype = { return this.str.match(regexp); }, + /** + * Same as String.matchAll() + * @param {string} regexp the regular expression to match + * @return {iterator} an iterator of the matches + */ + matchAll: function(regexp) { + return this.str.matchAll(regexp); + }, + /** * Same as String.replace() * @param {string} searchValue a regular expression to search for @@ -1053,6 +1062,144 @@ IString.prototype = { return this.str.toUpperCase(); }, + /** + * Same as String.endsWith(). + * @return {boolean} true if the given characters are found at + * the end of the string, and false otherwise + */ + endsWith: function(searchString, length) { + /* (note)length is optional. If it is omitted the default value is the length of string. + * But If length is omitted, it returns false on QT. (tested on QT 5.12.4 and 5.13.0) + */ + if (typeof length === "undefined") { + length = this.str.length; + } + return this.str.endsWith(searchString, length); + }, + + /** + * Same as String.startsWith(). + * @return {boolean} true if the given characters are found at + * the beginning of the string, and false otherwise + */ + startsWith: function(searchString, length) { + return this.str.startsWith(searchString, length); + }, + + /** + * Same as String.includes(). + * @return {boolean} true if the search string is found anywhere + * with the given string, and false otherwise + */ + includes: function(searchString, position) { + return this.str.includes(searchString, position); + }, + + /** + * Same as String.normalize(). If this JS engine does not support + * this method, then you can use the NormString class of ilib + * to the same thing (albeit a little slower). + * + * @return {string} the string in normalized form + */ + normalize: function(form) { + return this.str.normalize(form); + }, + + /** + * Same as String.padEnd(). + * @return {string} a string of the specified length with the + * pad string applied at the end of the current string + */ + padEnd: function(targetLength, padString) { + return this.str.padEnd(targetLength, padString); + }, + + /** + * Same as String.padStart(). + * @return {string} a string of the specified length with the + * pad string applied at the end of the current string + */ + padStart: function(targetLength, padString) { + return this.str.padStart(targetLength, padString); + }, + + /** + * Same as String.repeat(). + * @return {string} a new string containing the specified number + * of copies of the given string + */ + repeat: function(count) { + return this.str.repeat(count); + }, + + /** + * Same as String.toLocaleLowerCase(). If the JS engine does not support this + * method, you can use the ilib CaseMapper class instead. + * @return {string} a new string representing the calling string + * converted to lower case, according to any locale-sensitive + * case mappings + */ + toLocaleLowerCase: function(locale) { + return this.str.toLocaleLowerCase(locale); + }, + + /** + * Same as String.toLocaleUpperCase(). If the JS engine does not support this + * method, you can use the ilib CaseMapper class instead. + * @return {string} a new string representing the calling string + * converted to upper case, according to any locale-sensitive + * case mappings + */ + toLocaleUpperCase: function(locale) { + return this.str.toLocaleUpperCase(locale); + }, + + /** + * Same as String.trim(). + * @return {string} a new string representing the calling string stripped + * of whitespace from both ends. + */ + trim: function() { + return this.str.trim(); + }, + + /** + * Same as String.trimEnd(). + * @return {string} a new string representing the calling string stripped + * of whitespace from its (right) end. + */ + trimEnd: function() { + return this.str.trimEnd(); + }, + + /** + * Same as String.trimRight(). + * @return {string} a new string representing the calling string stripped + * of whitespace from its (right) end. + */ + trimRight: function() { + return this.str.trimRight(); + }, + + /** + * Same as String.trimStart(). + * @return {string} A new string representing the calling string stripped + * of whitespace from its beginning (left end). + */ + trimStart: function() { + return this.str.trimStart(); + }, + + /** + * Same as String.trimLeft(). + * @return {string} A new string representing the calling string stripped + * of whitespace from its beginning (left end). + */ + trimLeft: function() { + return this.str.trimLeft(); + }, + /** * Convert the character or the surrogate pair at the given * index into the string to a Unicode UCS-4 code point. @@ -1297,4 +1444,10 @@ IString.prototype = { } }; +Object.defineProperty(IString, 'length', { + get: function() { + return this._length(); + } +}); + module.exports = IString; diff --git a/js/lib/NameFmt.js b/js/lib/NameFmt.js index 8c2ebf8bb4..6bb4d320f8 100644 --- a/js/lib/NameFmt.js +++ b/js/lib/NameFmt.js @@ -1,7 +1,7 @@ /* * NameFmt.js - Format person names for display * - * Copyright © 2013-2015, 2018, JEDLSoft + * Copyright © 2013-2015, 2018-2019, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,6 +49,11 @@ var isPunct = require("./isPunct.js"); * name. eg. "Mr. Smith" *
  • formal_long - Format a name with the honorific or prefix/suffix and the * given and family name. eg. "Mr. John Smith" + *
  • familiar - Format a name with the most familiar style that the culture of the locale + * will accept. In some locales, it is not rude to address people you just met by their given name. + * In others, it is rude to address a person in such a familiar style unless you are previously + * invited to do so or unless you have known them for a while. In this case, it will use a more formal + * style, but still as familiar as possible so as not to be rude. * *
  • components - Format the name with the given components in the correct * order for those components. Components are encoded as a string of letters representing @@ -180,6 +185,10 @@ var NameFmt = function(options) { case "formal_long": this.style = "formal_long"; break; + case "fam": + case "familiar": + this.style = "familiar"; + break; } this.locale = this.locale || new Locale(); diff --git a/js/test/calendar/testthaisolardate.js b/js/test/calendar/testthaisolardate.js index 1b1dab2684..cfc837fccb 100644 --- a/js/test/calendar/testthaisolardate.js +++ b/js/test/calendar/testthaisolardate.js @@ -1,7 +1,7 @@ /* * testthaisolardate.js - test the Thai solar date object * - * Copyright © 2556, JEDLSoft + * Copyright © 2018, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/date/testDayOfWeek.js b/js/test/date/testDayOfWeek.js index 96797ca1d7..ffac49c228 100644 --- a/js/test/date/testDayOfWeek.js +++ b/js/test/date/testDayOfWeek.js @@ -1,7 +1,7 @@ /* - * testWeekDate.js + * testWeekDate.js - test the weekdata information * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1954,6 +1954,16 @@ module.exports.testweekdata = { var info = new LocaleInfo("zh-Hans-MY"); test.ok(info !== null); + test.equal(info.getFirstDayOfWeek(), 1); + test.equal(info.getWeekEndStart(), 6); + test.equal(info.getWeekEndEnd(), 0); + test.done(); + }, + testWeekData_ka_GE: function(test) { + test.expect(4); + var info = new LocaleInfo("ka-GE"); + test.ok(info !== null); + test.equal(info.getFirstDayOfWeek(), 1); 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 11eae4e0bd..6f29f37aae 100644 --- a/js/test/date/testMeridiems.js +++ b/js/test/date/testMeridiems.js @@ -1,7 +1,7 @@ /* - * testMeridiems.js + * testMeridiems.js - test the meridiems data * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1961,7 +1961,17 @@ module.exports.testmeridiems = { test.equal(fmt[0].name, "上午"); test.equal(fmt[1].name, "下午"); - + + test.done(); + }, + testMeridiem_ka_GE: function(test) { + test.expect(3); + var fmt = DateFmt.getMeridiemsRange({locale:"ka-GE"}); + test.ok(fmt !== null); + + test.equal(fmt[0].name, "AM"); + test.equal(fmt[1].name, "PM"); + test.done(); } -} +} \ No newline at end of file diff --git a/js/test/date/testMonthTranslation.js b/js/test/date/testMonthTranslation.js index f8a0c0a6b0..0c709f82fa 100644 --- a/js/test/date/testMonthTranslation.js +++ b/js/test/date/testMonthTranslation.js @@ -1,7 +1,7 @@ /* - * testMonthTranslation.js + * testMonthTranslation.js - test the month's translation * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -7270,6 +7270,51 @@ module.exports.testmonthtranslation = { test.equal(value[10], "11月"); test.equal(value[11], "12月"); + test.done(); + }, + testMonthTranslate_ka_GE: function(test) { + test.expect(24); + + // full, long: MMMM + // medium: MMM + // short: MM + + var value = [], i; + var fmt = new DateFmt({locale:"ka-GE", 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:"ka-GE", 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 b61c9ac9ab..98d7e4a687 100644 --- a/js/test/date/testSuite.html +++ b/js/test/date/testSuite.html @@ -77,6 +77,7 @@ + diff --git a/js/test/date/testSuiteFiles.js b/js/test/date/testSuiteFiles.js index ded0c6b62c..dbf16c1a08 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, 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. @@ -65,6 +65,7 @@ module.exports.files = [ "testdatefmt_id_ID.js", "testdatefmt_it_IT.js", "testdatefmt_ja_JP.js", + "testdatefmt_ka_GE.js", "testdatefmt_kk_Cyrl_KZ.js", "testdatefmt_km_KH.js", "testdatefmt_kn_IN.js", @@ -104,4 +105,4 @@ module.exports.files = [ "testdatefmt_zh_CN.js", "testdatefmt_zh_Hant_HK.js", "testdatefmt_zh_Hant_TW.js" -]; +]; \ No newline at end of file diff --git a/js/test/date/testWeekdayTranslation.js b/js/test/date/testWeekdayTranslation.js index ce39924120..4e9a8b6e83 100644 --- a/js/test/date/testWeekdayTranslation.js +++ b/js/test/date/testWeekdayTranslation.js @@ -1,7 +1,7 @@ /* * testWeekdayTranslation.js * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -11151,6 +11151,77 @@ module.exports.testWeekdayTranslation = { test.equal(value[5], "五"); test.equal(value[6], "六"); + test.done(); + }, + testWeekdayTranslationFull_ka_GE: function(test) { + // full -> wide + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"ka-GE", 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_ka_GE: function(test) { + // long -> abbreviate + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"ka-GE", 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_ka_GE: function(test) { + // medium -> short + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"ka-GE", 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_ka_GE: function(test) { + // short: narrow + test.expect(7); + var fmt, value = [], i; + fmt = new DateFmt({locale:"ka-GE", 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(); } -} +} \ No newline at end of file diff --git a/js/test/date/testcalendar.js b/js/test/date/testcalendar.js index f9e0301ce6..aa4593303b 100644 --- a/js/test/date/testcalendar.js +++ b/js/test/date/testcalendar.js @@ -1,7 +1,7 @@ /* * testcalendar.js - test the calendar support per locale * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ if (typeof(LocaleInfo) === "undefined") { module.exports.testcalendar = { testDefaultCalendar_GregorianCaseAll: function(test) { - test.expect(192); + test.expect(193); 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", @@ -32,7 +32,7 @@ module.exports.testcalendar = { "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","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","kk-Cyrl-KZ","km-KH","kn-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","nb-NO","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", @@ -54,6 +54,14 @@ module.exports.testcalendar = { test.done(); }, + testDefaultCalendar_ka_IR: function(test) { + test.expect(2); + var info = new LocaleInfo("ka-IR"); + test.ok(info !== null); + test.equal(info.getCalendar(), "persian"); + + test.done(); + }, testDefaultCalendar_fa_AF: function(test) { test.expect(2); var info = new LocaleInfo("fa-AF"); diff --git a/js/test/date/testclock.js b/js/test/date/testclock.js index bac77bcdc5..f6cc085945 100644 --- a/js/test/date/testclock.js +++ b/js/test/date/testclock.js @@ -1,7 +1,7 @@ /* * testclock.js - test the 12/24 hour support amongst various locales * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1764,6 +1764,15 @@ module.exports.testclock = { test.equal(info.getClock(), 12); + test.done(); + }, + testClock_ka_GE: function(test) { + test.expect(2); + var info = new LocaleInfo("ka-GE"); + test.ok(info !== null); + + test.equal(info.getClock(), 24); + test.done(); } } diff --git a/js/test/date/testdatefmt_cop_EG.js b/js/test/date/testdatefmt_cop_EG.js index 158c49abc5..0273c18283 100644 --- a/js/test/date/testdatefmt_cop_EG.js +++ b/js/test/date/testdatefmt_cop_EG.js @@ -11,7 +11,7 @@ * * 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 exprtestDateFmtFormatRelativeWithinMinuteAfter_cop_EGess or implied. + * 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. diff --git a/js/test/date/testdatefmt_es_CO.js b/js/test/date/testdatefmt_es_CO.js index c52b1cc153..1e3ad67d3a 100644 --- a/js/test/date/testdatefmt_es_CO.js +++ b/js/test/date/testdatefmt_es_CO.js @@ -9,7 +9,7 @@ * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applible law or agreed to in writing, software + * 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. * diff --git a/js/test/date/testdatefmt_gu_IN.js b/js/test/date/testdatefmt_gu_IN.js index 8b4ff575f2..4fac7c1f37 100644 --- a/js/test/date/testdatefmt_gu_IN.js +++ b/js/test/date/testdatefmt_gu_IN.js @@ -4,7 +4,7 @@ * Copyright © 2013-2015,2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tgus file except in compliance with 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 diff --git a/js/test/date/testdatefmt_ka_GE.js b/js/test/date/testdatefmt_ka_GE.js new file mode 100644 index 0000000000..56617ee2dd --- /dev/null +++ b/js/test/date/testdatefmt_ka_GE.js @@ -0,0 +1,1788 @@ +/* + * testdatefmt_ka_GE.js - test the date formatter object in Georgian + * + * 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_ka_GE = { + setUp: function(callback) { + ilib.clearCache(); + callback(); + }, + + testDateFmtConstructorEmpty_ka_GE: function(test) { + test.expect(1); + var fmt = new DateFmt({locale: "ka-GE"}); + + test.ok(fmt !== null); + test.done(); + }, + + testDateFmtSimpleShort_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "short"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "medium"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "29 სექ. 2011"); + test.done(); + }, + + testDateFmtSimpleLong_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "long"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "29 სექტემბერი, 2011"); + test.done(); + }, + + testDateFmtSimpleFull_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29 სექტემბერი, 2011'); + test.done(); + }, + + testDateFmtSimpleTimeShort_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "short", type: "time"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '13:45'); + test.done(); + }, + + testDateFmtSimpleTimeMedium_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "medium", type: "time"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '13:45'); + test.done(); + }, + + testDateFmtSimpleTimeLong_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", timelength: "long", type: "time"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '13:45'); + test.done(); + }, + + testDateFmtSimpleTimeFull_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", type: "time"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 1, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '01:45'); + test.done(); + }, + + testDateFmtDateTimeSimpleShort_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "short", type: "datetime"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "medium", type: "datetime"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "long", type: "datetime"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", type: "datetime"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", calendar: "julian", template: "yyyy-MM-dd"}); + test.ok(fmt !== null); + + var date = new JulianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", calendar: "julian", template: "yyyy-MM-dd HH:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", clock: "12", template: "HH:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateClock12Switchkk_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", clock: "12", template: "kk:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateClock24Switchhh_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", clock: "24", template: "hh:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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: "ka-GE", clock: "24", template: "KK:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault12hh_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", template: "hh:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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: "ka-GE", template: "KK:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "01:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault24HH_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", template: "HH:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtTemplateNoClockDoNotFollowLocaleDefault24kk_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", template: "kk:mm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + + testDateFmtTypeDate_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "date"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '13:45'); + test.done(); + }, + + testDateFmtTypeDateTime_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "datetime"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "y"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "11"); + test.done(); + }, + + testDateFmtShortDateComponentsM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "m"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "09"); + test.done(); + }, + + testDateFmtShortDateComponentsN_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "n"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'ს'); + test.done(); + }, + + testDateFmtShortDateComponentsD_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "d"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "29"); + test.done(); + }, + + testDateFmtShortDateComponentsDM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "dm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29.09'); + test.done(); + }, + + testDateFmtShortDateComponentsMY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "my"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '09.11'); + test.done(); + }, + + testDateFmtShortDateComponentsDMY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "dmy"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "wdm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'ხ, 29.09'); + test.done(); + }, + + testDateFmtShortDateComponentsWDMY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "wdmy"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", date: "wdm", length: "long"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'ხუთ, 29 სექტემბერი'); + test.done(); + }, + + testDateFmtFullDateComponentsY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "y"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "2011"); + test.done(); + }, + + testDateFmtFullDateComponentsM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "m"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "სექტემბერი"); + test.done(); + }, + + testDateFmtFullDateComponentsD_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "d"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), "29"); + test.done(); + }, + + testDateFmtFullDateComponentsDM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "dm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29 სექტემბერი'); + test.done(); + }, + + testDateFmtFullDateComponentsMY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "my"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'სექტემბერი, 2011'); + test.done(); + }, + + testDateFmtFullDateComponentsDMY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "dmy"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), '29 სექტემბერი, 2011'); + test.done(); + }, + + testDateFmtFullDateComponentsWDM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "wdm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'ხუთშაბათი, 29 სექტემბერი'); + test.done(); + }, + + testDateFmtFullDateComponentsWDMY_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full", date: "wdmy"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + test.equal(fmt.format(date), 'ხუთშაბათი, 29 სექტემბერი, 2011'); + test.done(); + }, + + testDateFmtShortTimeComponentsS_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "s"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "37"); + test.done(); + }, + + testDateFmtShortTimeComponentsM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "m"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45"); + test.done(); + }, + + testDateFmtShortTimeComponentsH_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "h"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13"); + test.done(); + }, + + testDateFmtShortTimeComponentsMS_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "ms"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45:37"); + test.done(); + }, + + testDateFmtShortTimeComponentsHM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "hm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMS_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "hms"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "hma"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMZ_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + time: "hmz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45 +04"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMAZ_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + time: "hmaz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45 +04"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMSA_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", time: "hmsa"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + time: "hmsz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45:37 +04"); + test.done(); + }, + + testDateFmtShortTimeComponentsHMSAZ_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + time: "hmsaz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45:37 +04"); + test.done(); + }, + + testDateFmtFullTimeComponentsS_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "s"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "37"); + test.done(); + }, + + testDateFmtFullTimeComponentsM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "m"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45"); + test.done(); + }, + + testDateFmtFullTimeComponentsH_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "h"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13"); + test.done(); + }, + + testDateFmtFullTimeComponentsMS_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "ms"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "45:37"); + test.done(); + }, + + testDateFmtFullTimeComponentsHM_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "hm"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMS_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "hms"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "hma"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMZ_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + length: "full", + time: "hmz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45 +04"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMAZ_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + length: "full", + time: "hmaz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45 +04"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMSA_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", type: "time", length: "full", time: "hmsa"}); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + 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_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + length: "full", + time: "hmsz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45:37 +04"); + test.done(); + }, + + testDateFmtFullTimeComponentsHMSAZ_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + length: "full", + time: "hmsaz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45:37 +04"); + test.done(); + }, + + testDateFmtWithTimeZoneAndNoDST_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({ + locale: "ka-GE", + type: "time", + length: "full", + time: "hmsz", + timezone: "Asia/Tbilisi" + }); + test.ok(fmt !== null); + + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 12, + day: 29, + hour: 13, + minute: 45, + second: 37, + millisecond: 0 + }); + test.equal(fmt.format(date), "13:45:37 +04"); + test.done(); + }, + + testDateFmtFormatRelativeWithinMinuteAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 30, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), "30 წამში"); + test.done(); + }, +testDateFmtFormatRelativeWithinMinuteBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 44, + second: 30, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), "30 წამის წინ"); + test.done(); + }, +testDateFmtFormatRelativeWithinHourAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), "10 წუთში"); + test.done(); + }, +testDateFmtFormatRelativeWithinHourBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '10 წუთის წინ'); + test.done(); + }, +testDateFmtFormatRelativeWithinDayAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 17, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '4 საათში'); + test.done(); + }, +testDateFmtFormatRelativeWithinDayBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '4 საათის წინ'); + test.done(); + }, + + testDateFmtFormatRelativeWithinFortnightAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '4 დღეში'); + test.done(); + }, +testDateFmtFormatRelativeWithinFortnightBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 16, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '4 დღის წინ'); + test.done(); + }, + + testDateFmtFormatRelativeWithinQuarterAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 11, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '9 კვირაში'); + test.done(); + }, +testDateFmtFormatRelativeWithinQuarterBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 7, + day: 18, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '9 კვირის წინ'); + test.done(); + }, + + testDateFmtFormatRelativeWithinTwoYearsAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2013, + month: 1, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '16 თვეში'); + test.done(); + }, +testDateFmtFormatRelativeWithinTwoYearsBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2010, + month: 7, + day: 18, + hour: 9, + minute: 35, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '14 თვის წინ'); + test.done(); + }, + + testDateFmtFormatRelativeYearsAfter_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + year: 2025, + month: 10, + day: 24, + hour: 15, + minute: 55, + second: 0, + millisecond: 0 + }); + test.equal(fmt.formatRelative(reference, date), '14 წელიწადში'); + test.done(); + }, +testDateFmtFormatRelativeYearsBefore_ka_GE: function(test) { + test.expect(2); + var fmt = new DateFmt({locale: "ka-GE", length: "full"}); + test.ok(fmt !== null); + + var reference = new GregorianDate({ + locale: "ka-GE", + year: 2011, + month: 9, + day: 20, + hour: 13, + minute: 45, + second: 0, + millisecond: 0 + }); + var date = new GregorianDate({ + locale: "ka-GE", + 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_kn_IN.js b/js/test/date/testdatefmt_kn_IN.js index 4617f3da5f..fbec9e72e4 100644 --- a/js/test/date/testdatefmt_kn_IN.js +++ b/js/test/date/testdatefmt_kn_IN.js @@ -4,7 +4,7 @@ * Copyright © 2013-2015,2017-2018, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tkns file except in compliance with 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 @@ -13,7 +13,7 @@ * 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 lanknage governing permissions and + * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/js/test/date/testdatefmt_lt_LT.js b/js/test/date/testdatefmt_lt_LT.js index 37c7250d5c..59b131e415 100644 --- a/js/test/date/testdatefmt_lt_LT.js +++ b/js/test/date/testdatefmt_lt_LT.js @@ -17,8 +17,6 @@ * limitations under the License. */ - - if (typeof(JulianDate) === "undefined") { var JulianDate = require("../../lib/JulianDate.js"); } diff --git a/js/test/date/testdatefmt_lv_LV.js b/js/test/date/testdatefmt_lv_LV.js index fabc46173f..b2bd75a0d7 100644 --- a/js/test/date/testdatefmt_lv_LV.js +++ b/js/test/date/testdatefmt_lv_LV.js @@ -17,7 +17,6 @@ * limitations under the License. */ - if (typeof(JulianDate) === "undefined") { var JulianDate = require("../../lib/JulianDate.js"); } diff --git a/js/test/date/testdatefmt_ms_MY.js b/js/test/date/testdatefmt_ms_MY.js index 1d7579e1ce..677a09bd6a 100644 --- a/js/test/date/testdatefmt_ms_MY.js +++ b/js/test/date/testdatefmt_ms_MY.js @@ -17,7 +17,6 @@ * limitations under the License. */ - if (typeof(JulianDate) === "undefined") { var JulianDate = require("../../lib/JulianDate.js"); } diff --git a/js/test/date/testdatefmt_pl_PL.js b/js/test/date/testdatefmt_pl_PL.js index 4db1503541..ca68b5e6f8 100644 --- a/js/test/date/testdatefmt_pl_PL.js +++ b/js/test/date/testdatefmt_pl_PL.js @@ -7,7 +7,7 @@ * 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 + * 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, diff --git a/js/test/date/testdatefmt_ro_RO.js b/js/test/date/testdatefmt_ro_RO.js index 7f08ebd88f..b695517543 100644 --- a/js/test/date/testdatefmt_ro_RO.js +++ b/js/test/date/testdatefmt_ro_RO.js @@ -17,9 +17,6 @@ * limitations under the License. */ - - - if (typeof(JulianDate) === "undefined") { var JulianDate = require("../../lib/JulianDate.js"); } diff --git a/js/test/date/testdatefmt_si_LK.js b/js/test/date/testdatefmt_si_LK.js index 729c2dd2e3..efc4f016da 100644 --- a/js/test/date/testdatefmt_si_LK.js +++ b/js/test/date/testdatefmt_si_LK.js @@ -1,7 +1,7 @@ /* * testdatefmt_si_LK.js - test the date formatter object in Sri Lanka * - * Copyright © 2017,2017-2018, JEDLSoft + * Copyright © 2017-2018, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/date/testdatefmt_sq_AL.js b/js/test/date/testdatefmt_sq_AL.js index e65c1132f8..ed23942415 100644 --- a/js/test/date/testdatefmt_sq_AL.js +++ b/js/test/date/testdatefmt_sq_AL.js @@ -10,7 +10,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * dCESTributed under the License is dCESTributed on an "AS IS" BASIS, + * 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 diff --git a/js/test/date/testdatefmt_sw_KE.js b/js/test/date/testdatefmt_sw_KE.js index 260ed28ff0..9b3e1b6cb2 100644 --- a/js/test/date/testdatefmt_sw_KE.js +++ b/js/test/date/testdatefmt_sw_KE.js @@ -1,7 +1,7 @@ /* * testdatefmt_sw_KE.js - test the date formatter object in Kenya * - * Copyright © 2017,2017-2018, JEDLSoft + * Copyright © 2017-2018, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/date/testdatefmt_ta_IN.js b/js/test/date/testdatefmt_ta_IN.js index ef65c42e06..c120190b2d 100644 --- a/js/test/date/testdatefmt_ta_IN.js +++ b/js/test/date/testdatefmt_ta_IN.js @@ -4,7 +4,7 @@ * Copyright © 2013-2015,2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use ttas file except in compliance with 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 diff --git a/js/test/date/testdatefmt_te_IN.js b/js/test/date/testdatefmt_te_IN.js index cf972e1460..15522a0913 100644 --- a/js/test/date/testdatefmt_te_IN.js +++ b/js/test/date/testdatefmt_te_IN.js @@ -16,6 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + if (typeof(JulianDate) === "undefined") { var JulianDate = require("../../lib/JulianDate.js"); } diff --git a/js/test/date/testdatetimefmt.js b/js/test/date/testdatetimefmt.js index 9e3cbfcf9f..93af844f9b 100644 --- a/js/test/date/testdatetimefmt.js +++ b/js/test/date/testdatetimefmt.js @@ -1,7 +1,7 @@ /* - * datetimefmt.js + * datetimefmt.js - test the date formatter template * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -5056,6 +5056,32 @@ module.exports.testdatetimeformat = { result1 = new DateFmt({locale:"zh-Hans-MY", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template; test.equal(result1, "z ah:mm:ss"); + test.done(); + }, + testDateTimeFormat_ka_GE: function(test) { + test.expect(7); + + var result1, result2, result3, result4; + + result1 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template; + result2 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "long", useNative:false, timezone:"local"}).template; + result3 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "medium", useNative:false, timezone:"local"}).template; + result4 = new DateFmt({locale:"ka-GE", type:"date", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template; + + test.equal(result1, "EEEE, dd MMMM, yyyy"); + test.equal(result2, "EEE, d MMMM, yyyy"); + test.equal(result3, "EE, d MMM. yyyy"); + test.equal(result4, "E, dd.MM.yy"); + + result1 = new DateFmt({locale:"ka-GE", type:"datetime", date:"dmwy", length: "full", useNative:false, timezone:"local"}).template; + result2 = new DateFmt({locale:"ka-GE", type:"datetime", date:"dmwy", length: "short", useNative:false, timezone:"local"}).template; + + test.equal(result1, "EEEE, dd MMMM, yyyy, HH:mm"); + test.equal(result2, "E, dd.MM.yy, HH:mm"); + + result1 = new DateFmt({locale:"ka-GE", type:"time", time:"ahmsz", length:"full", useNative:false, timezone:"local"}).template; + test.equal(result1, "HH:mm:ss z"); + test.done(); } -} +} \ No newline at end of file diff --git a/js/test/daterange/testSuite.html b/js/test/daterange/testSuite.html index 9feb299790..3d48d1a1e9 100644 --- a/js/test/daterange/testSuite.html +++ b/js/test/daterange/testSuite.html @@ -67,6 +67,7 @@ + diff --git a/js/test/daterange/testSuiteFiles.js b/js/test/daterange/testSuiteFiles.js index faa5905e73..d79236ec11 100644 --- a/js/test/daterange/testSuiteFiles.js +++ b/js/test/daterange/testSuiteFiles.js @@ -55,6 +55,7 @@ module.exports.files = [ "testdatefmtrange_id_ID.js", "testdatefmtrange_it_IT.js", "testdatefmtrange_ja_JP.js", + "testdatefmtrange_ka_GE.js", "testdatefmtrange_kk_Cyrl_KZ.js", "testdatefmtrange_km_KH.js", "testdatefmtrange_kn_IN.js", diff --git a/js/test/daterange/testdatefmtrange_am_ET.js b/js/test/daterange/testdatefmtrange_am_ET.js index be67d87e89..cf683fa382 100644 --- a/js/test/daterange/testdatefmtrange_am_ET.js +++ b/js/test/daterange/testdatefmtrange_am_ET.js @@ -4,8 +4,8 @@ * Copyright © 2015-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 * diff --git a/js/test/daterange/testdatefmtrange_ar_SA.js b/js/test/daterange/testdatefmtrange_ar_SA.js index 342dd8572d..560f566c6c 100644 --- a/js/test/daterange/testdatefmtrange_ar_SA.js +++ b/js/test/daterange/testdatefmtrange_ar_SA.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed under tar Apacar License, Version 2.0 (tar "License"); - * you may not use this file except in compliance warh tar License. - * You may obtain a copy of tar License at + * 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.apacar.org/licensar/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlars required by applicable law or agreed to in wraring, software - * distributed under tar License is distributed on an "AS IS" BASIS, - * WSAHOUT WARRANTISA OR CONDSAIONS OF ANY KIND, eararr exprars or implied. + * 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 tar License for tar specific language governing permissions and - * limarations under tar License. + * See the License for the specific language governing permissions and + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_as_IN.js b/js/test/daterange/testdatefmtrange_as_IN.js index d583023e50..64a3a265e9 100644 --- a/js/test/daterange/testdatefmtrange_as_IN.js +++ b/js/test/daterange/testdatefmtrange_as_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_as_IN.js - test the date range formatter object in Assamese/india * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/js/test/daterange/testdatefmtrange_bg_BG.js b/js/test/daterange/testdatefmtrange_bg_BG.js index b25c2d5353..cf2ff00ca9 100644 --- a/js/test/daterange/testdatefmtrange_bg_BG.js +++ b/js/test/daterange/testdatefmtrange_bg_BG.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wbgh 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/licensbg/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlbgs required by applicable law or agreed to in wrbging, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WBGHOUT WARRANTIBG OR CONDBGIONS OF ANY KIND, ebgher exprbgs or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limbgations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_bn_IN.js b/js/test/daterange/testdatefmtrange_bn_IN.js index 62078c7aaa..5021bb9be1 100644 --- a/js/test/daterange/testdatefmtrange_bn_IN.js +++ b/js/test/daterange/testdatefmtrange_bn_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_bn_IN.js - test the date range formatter object in Bengali/india * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_cs_CZ.js b/js/test/daterange/testdatefmtrange_cs_CZ.js index a862d8c54e..0cc35bfa71 100644 --- a/js/test/daterange/testdatefmtrange_cs_CZ.js +++ b/js/test/daterange/testdatefmtrange_cs_CZ.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wcsh 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/licenscs/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlcss required by applicable law or agreed to in wrcsing, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WCZHOUT WARRANTICZ OR CONDCZIONS OF ANY KIND, ecsher exprcss or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limcsations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_el_GR.js b/js/test/daterange/testdatefmtrange_el_GR.js index 6e8c6beac1..0afe77d2e0 100644 --- a/js/test/daterange/testdatefmtrange_el_GR.js +++ b/js/test/daterange/testdatefmtrange_el_GR.js @@ -4,16 +4,16 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tels file except GR compliance with the License. - * You may obtaGR a copy of the License at + * 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 GR writGRg, software + * 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 KGRD, either express or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governGRg permissions and + * See the License for the specific language governing permissions and * limitations under the License. */ diff --git a/js/test/daterange/testdatefmtrange_en_GB.js b/js/test/daterange/testdatefmtrange_en_GB.js index 571c44344b..8b2c177e2f 100644 --- a/js/test/daterange/testdatefmtrange_en_GB.js +++ b/js/test/daterange/testdatefmtrange_en_GB.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unenr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unenr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unenr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { @@ -23,24 +23,6 @@ if (typeof(GregorianDate) === "undefined") { if (typeof(DateRngFmt) === "undefined") { var DateRngFmt = require("../../lib/DateRngFmt.js"); } -/* - * testdatefmtrange_en_GB.js - test the date range formatter object in German/Germany - * - * Copyright © 2012-2017, JEDLSoft - * - * Licensed unenr 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 unenr 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 unenr the License. - */ if (typeof(ilib) === "undefined") { var ilib = require("../../lib/ilib.js"); diff --git a/js/test/daterange/testdatefmtrange_en_US.js b/js/test/daterange/testdatefmtrange_en_US.js index 523ae36e56..716f15999f 100644 --- a/js/test/daterange/testdatefmtrange_en_US.js +++ b/js/test/daterange/testdatefmtrange_en_US.js @@ -17,7 +17,6 @@ * limitations under the License. */ - if (typeof(GregorianDate) === "undefined") { var GregorianDate = require("../../lib/GregorianDate.js"); } diff --git a/js/test/daterange/testdatefmtrange_es_UY.js b/js/test/daterange/testdatefmtrange_es_UY.js index 50cb7615ee..6eeaca2c84 100644 --- a/js/test/daterange/testdatefmtrange_es_UY.js +++ b/js/test/daterange/testdatefmtrange_es_UY.js @@ -11,7 +11,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTY OR CONDITIONS OF ANY KIND, either express or implied. + * 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. diff --git a/js/test/daterange/testdatefmtrange_es_VE.js b/js/test/daterange/testdatefmtrange_es_VE.js index 3481f2babf..d6c75448e2 100644 --- a/js/test/daterange/testdatefmtrange_es_VE.js +++ b/js/test/daterange/testdatefmtrange_es_VE.js @@ -11,7 +11,7 @@ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIVE OR CONDITIONS OF ANY KIND, either express or implied. + * 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. diff --git a/js/test/daterange/testdatefmtrange_et_EE.js b/js/test/daterange/testdatefmtrange_et_EE.js index 33bb3836ac..6cf4a40227 100644 --- a/js/test/daterange/testdatefmtrange_et_EE.js +++ b/js/test/daterange/testdatefmtrange_et_EE.js @@ -6,13 +6,13 @@ * 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. */ diff --git a/js/test/daterange/testdatefmtrange_fa_IR.js b/js/test/daterange/testdatefmtrange_fa_IR.js index 1205cffcfd..50709b2f68 100644 --- a/js/test/daterange/testdatefmtrange_fa_IR.js +++ b/js/test/daterange/testdatefmtrange_fa_IR.js @@ -6,13 +6,13 @@ * 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 - * + * + * 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. */ diff --git a/js/test/daterange/testdatefmtrange_fi_FI.js b/js/test/daterange/testdatefmtrange_fi_FI.js index 9fea5114c9..5513eafee3 100644 --- a/js/test/daterange/testdatefmtrange_fi_FI.js +++ b/js/test/daterange/testdatefmtrange_fi_FI.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unfir the Apache License, Version 2.0 (the "License"); + * 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 unfir the License is distributed on an "AS IS" BASIS, + * 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 unfir the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_fmttemplate.js b/js/test/daterange/testdatefmtrange_fmttemplate.js index ecb3ef3ea4..ab831b9c7c 100644 --- a/js/test/daterange/testdatefmtrange_fmttemplate.js +++ b/js/test/daterange/testdatefmtrange_fmttemplate.js @@ -13794,6 +13794,78 @@ module.exports.testdaterangefmt = { test.equal(templatec30[2], "{sy}年 – {ey}年"); test.equal(templatec30[3], "{sy}年 – {ey}年"); + test.done(); + }, + testDateRngFmt_ka_GE: 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:"ka-GE", 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(); } -} +} \ No newline at end of file diff --git a/js/test/daterange/testdatefmtrange_ga_IE.js b/js/test/daterange/testdatefmtrange_ga_IE.js index 940c1406f9..c8f488928b 100644 --- a/js/test/daterange/testdatefmtrange_ga_IE.js +++ b/js/test/daterange/testdatefmtrange_ga_IE.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wgah 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/licensga/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlgas required by applicable law or agreed to in wrgaing, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WIEHOUT WARRANTIIE OR CONDIEIONS OF ANY KIND, egaher exprgas or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limgaations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_gu_IN.js b/js/test/daterange/testdatefmtrange_gu_IN.js index 030c1d5e60..1e8c5898e0 100644 --- a/js/test/daterange/testdatefmtrange_gu_IN.js +++ b/js/test/daterange/testdatefmtrange_gu_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_gu_in.js - test the date range formatter object in Gujrati/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/js/test/daterange/testdatefmtrange_ha_Latn_NG.js b/js/test/daterange/testdatefmtrange_ha_Latn_NG.js index bc9b0e1cf9..60021b4acc 100644 --- a/js/test/daterange/testdatefmtrange_ha_Latn_NG.js +++ b/js/test/daterange/testdatefmtrange_ha_Latn_NG.js @@ -3,22 +3,20 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unuzr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unuzr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unuzr the License. + * limitations under the License. */ - - if (typeof(GregorianDate) === "undefined") { var GregorianDate = require("../../lib/GregorianDate.js"); } diff --git a/js/test/daterange/testdatefmtrange_he_IL.js b/js/test/daterange/testdatefmtrange_he_IL.js index 4803e1e67e..60556c8591 100644 --- a/js/test/daterange/testdatefmtrange_he_IL.js +++ b/js/test/daterange/testdatefmtrange_he_IL.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wheh 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/licenshe/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlhes required by applicable law or agreed to in wrheing, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WILHOUT WARRANTIIL OR CONDILIONS OF ANY KIND, eheher exprhes or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limheations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_hi_IN.js b/js/test/daterange/testdatefmtrange_hi_IN.js index ed5fde0441..ae27705038 100644 --- a/js/test/daterange/testdatefmtrange_hi_IN.js +++ b/js/test/daterange/testdatefmtrange_hi_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_hi_IN.js - test the date range formatter object in Hindi/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_hu_HU.js b/js/test/daterange/testdatefmtrange_hu_HU.js index 224789e695..d792902b72 100644 --- a/js/test/daterange/testdatefmtrange_hu_HU.js +++ b/js/test/daterange/testdatefmtrange_hu_HU.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance whuh 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/licenshu/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlhus required by applicable law or agreed to in wrhuing, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WHUHOUT WARRANTIHU OR CONDHUIONS OF ANY KIND, ehuher exprhus or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limhuations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_id_ID.js b/js/test/daterange/testdatefmtrange_id_ID.js index b9e1aa566c..9808df860c 100644 --- a/js/test/daterange/testdatefmtrange_id_ID.js +++ b/js/test/daterange/testdatefmtrange_id_ID.js @@ -4,8 +4,8 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 * diff --git a/js/test/daterange/testdatefmtrange_it_IT.js b/js/test/daterange/testdatefmtrange_it_IT.js index a6a64a4d54..0313492ae5 100644 --- a/js/test/daterange/testdatefmtrange_it_IT.js +++ b/js/test/daterange/testdatefmtrange_it_IT.js @@ -7,11 +7,11 @@ * 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/licensit/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlits required by applicable law or agreed to in writing, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIIT OR CONDITIONS OF ANY KIND, either exprits or implied. + * 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. diff --git a/js/test/daterange/testdatefmtrange_ka_GE.js b/js/test/daterange/testdatefmtrange_ka_GE.js new file mode 100644 index 0000000000..5bef705be4 --- /dev/null +++ b/js/test/daterange/testdatefmtrange_ka_GE.js @@ -0,0 +1,692 @@ +/* + * testdatefmtrange_ka_GE.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_ka_GE = { + setUp: function(callback) { + ilib.clearCache(); + callback(); + }, + + testDateRngFmtkaGERangeInDayShort: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeInDayMedium: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeInDayLong: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeInDayFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + + testDateRngFmtkaGERangeNextDayShort: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextDayMedium: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextDayLong: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextDayFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + + testDateRngFmtkaGERangeMultiDayShort: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeMultiDayMedium: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeMultiDayLong: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeMultiDayFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + + testDateRngFmtkaGERangeNextMonthShort: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextMonthMedium: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextMonthLong: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextMonthFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + + testDateRngFmtkaGERangeNextYearShort: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextYearMedium: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextYearLong: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeNextYearFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + + testDateRngFmtkaGERangeMultiYearShort: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeMultiYearMedium: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeMultiYearLong: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGERangeMultiYearFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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(); + }, + testDateRngFmtkaGEManyYearsFull: function(test) { + test.expect(2); + var fmt = new DateRngFmt({locale: "ka-GE", 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_kk_Cyrl_KZ.js b/js/test/daterange/testdatefmtrange_kk_Cyrl_KZ.js index 7411152dea..fec8b02fef 100644 --- a/js/test/daterange/testdatefmtrange_kk_Cyrl_KZ.js +++ b/js/test/daterange/testdatefmtrange_kk_Cyrl_KZ.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wkk-Cyrlh 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/licenskk-Cyrl/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlkk-Cyrls required by applicable law or agreed to in wrkk-Cyrling, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WKZHOUT WARRANTIKZ OR CONDKZIONS OF ANY KIND, ekk-Cyrlher exprkk-Cyrls or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limkk-Cyrlations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_kn_IN.js b/js/test/daterange/testdatefmtrange_kn_IN.js index 6b9f475197..c941f22c1e 100644 --- a/js/test/daterange/testdatefmtrange_kn_IN.js +++ b/js/test/daterange/testdatefmtrange_kn_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_kn_IN.js - test the date range formatter object in Kannada/india * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_ko_KR.js b/js/test/daterange/testdatefmtrange_ko_KR.js index 075d8a48f9..5d9e341db8 100644 --- a/js/test/daterange/testdatefmtrange_ko_KR.js +++ b/js/test/daterange/testdatefmtrange_ko_KR.js @@ -1,18 +1,17 @@ /* * testdatefmtrange_ko_KR.js - test the date range formatter object in Korean/Korea * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tkos file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_ku_Arab_IQ.js b/js/test/daterange/testdatefmtrange_ku_Arab_IQ.js index e40fe5f762..6fd7435e3e 100644 --- a/js/test/daterange/testdatefmtrange_ku_Arab_IQ.js +++ b/js/test/daterange/testdatefmtrange_ku_Arab_IQ.js @@ -2,18 +2,17 @@ * testdatefmtrange_ku_Arab_IQ.js - test the date range formatter object in * Kurdish for Iraq in Arabic script * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tkos file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_lt_LT.js b/js/test/daterange/testdatefmtrange_lt_LT.js index 71fc82badc..5553690029 100644 --- a/js/test/daterange/testdatefmtrange_lt_LT.js +++ b/js/test/daterange/testdatefmtrange_lt_LT.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wlth 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/licenslt/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unllts required by applicable law or agreed to in wrlting, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WLTHOUT WARRANTILT OR CONDLTIONS OF ANY KIND, elther exprlts or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limltations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_lv_LV.js b/js/test/daterange/testdatefmtrange_lv_LV.js index f7ec7634ce..23061ef9fe 100644 --- a/js/test/daterange/testdatefmtrange_lv_LV.js +++ b/js/test/daterange/testdatefmtrange_lv_LV.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wlvh 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/licenslv/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unllvs required by applicable law or agreed to in wrlving, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WLVHOUT WARRANTILV OR CONDLVIONS OF ANY KIND, elvher exprlvs or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limlvations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_mk_MK.js b/js/test/daterange/testdatefmtrange_mk_MK.js index ae49b64af8..e107efcf3e 100644 --- a/js/test/daterange/testdatefmtrange_mk_MK.js +++ b/js/test/daterange/testdatefmtrange_mk_MK.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wmkh 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/licensmk/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlmks required by applicable law or agreed to in wrmking, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WMKHOUT WARRANTIMK OR CONDMKIONS OF ANY KIND, emkher exprmks or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limmkations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_ml_IN.js b/js/test/daterange/testdatefmtrange_ml_IN.js index 6a59288c88..c8a60b659a 100644 --- a/js/test/daterange/testdatefmtrange_ml_IN.js +++ b/js/test/daterange/testdatefmtrange_ml_IN.js @@ -12,14 +12,12 @@ * * 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. + * 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"); } diff --git a/js/test/daterange/testdatefmtrange_mr_IN.js b/js/test/daterange/testdatefmtrange_mr_IN.js index 21c8522b42..4088e694ef 100644 --- a/js/test/daterange/testdatefmtrange_mr_IN.js +++ b/js/test/daterange/testdatefmtrange_mr_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_mr_IN.js - test the date range formatter object in Marathi/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_ms_MY.js b/js/test/daterange/testdatefmtrange_ms_MY.js index 17d052e621..0551164522 100644 --- a/js/test/daterange/testdatefmtrange_ms_MY.js +++ b/js/test/daterange/testdatefmtrange_ms_MY.js @@ -1,18 +1,17 @@ /* * testdatefmtrange_ms_MY.js - test the date range formatter object in Malaysian/Malaysia * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use tmss file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_nb_NO.js b/js/test/daterange/testdatefmtrange_nb_NO.js index 16d10b6dd6..0b3128c8fa 100644 --- a/js/test/daterange/testdatefmtrange_nb_NO.js +++ b/js/test/daterange/testdatefmtrange_nb_NO.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unNOr the Apache License, Version 2.0 (the "License"); + * 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 * - * Unbess required by applicable law or agreed to in writing, software - * distributed unNOr the License is distributed on an "AS IS" BASIS, + * 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 unNOr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_nl_NL.js b/js/test/daterange/testdatefmtrange_nl_NL.js index cd3c0fcb72..640e7880fd 100644 --- a/js/test/daterange/testdatefmtrange_nl_NL.js +++ b/js/test/daterange/testdatefmtrange_nl_NL.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unNLr the Apache License, Version 2.0 (the "License"); + * 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 unNLr the License is distributed on an "AS IS" BASIS, + * 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 unNLr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_or_IN.js b/js/test/daterange/testdatefmtrange_or_IN.js index d2e8323358..2969e1e516 100644 --- a/js/test/daterange/testdatefmtrange_or_IN.js +++ b/js/test/daterange/testdatefmtrange_or_IN.js @@ -11,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_pa_IN.js b/js/test/daterange/testdatefmtrange_pa_IN.js index 8ce08b9111..978a7693ac 100644 --- a/js/test/daterange/testdatefmtrange_pa_IN.js +++ b/js/test/daterange/testdatefmtrange_pa_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_pa_IN.js - test the date range formatter object in Punjabi/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_pl_PL.js b/js/test/daterange/testdatefmtrange_pl_PL.js index 3ebf828066..7180c238e5 100644 --- a/js/test/daterange/testdatefmtrange_pl_PL.js +++ b/js/test/daterange/testdatefmtrange_pl_PL.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unPLr the Apache License, Version 2.0 (the "License"); + * 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 * - * Upless required by applicable law or agreed to in writing, software - * distributed unPLr the License is distributed on an "AS IS" BASIS, + * 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 unPLr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_ro_RO.js b/js/test/daterange/testdatefmtrange_ro_RO.js index d3f7519b6d..30d8d5bea1 100644 --- a/js/test/daterange/testdatefmtrange_ro_RO.js +++ b/js/test/daterange/testdatefmtrange_ro_RO.js @@ -3,21 +3,20 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unror the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unror the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unror the License. + * limitations under the License. */ - if (typeof(GregorianDate) === "undefined") { var GregorianDate = require("../../lib/GregorianDate.js"); } diff --git a/js/test/daterange/testdatefmtrange_ru_RU.js b/js/test/daterange/testdatefmtrange_ru_RU.js index 67afd8273a..75b628c642 100644 --- a/js/test/daterange/testdatefmtrange_ru_RU.js +++ b/js/test/daterange/testdatefmtrange_ru_RU.js @@ -3,22 +3,20 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unrur the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unrur the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unrur the License. + * limitations under the License. */ - - if (typeof(GregorianDate) === "undefined") { var GregorianDate = require("../../lib/GregorianDate.js"); } diff --git a/js/test/daterange/testdatefmtrange_si_LK.js b/js/test/daterange/testdatefmtrange_si_LK.js index fe837f06c7..837c702951 100644 --- a/js/test/daterange/testdatefmtrange_si_LK.js +++ b/js/test/daterange/testdatefmtrange_si_LK.js @@ -1,22 +1,22 @@ -/* - * testdatefmtrange_si_LK.js - test the date range formatter object in Sri Lanka - * - * Copyright © 2017,2017, 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. - */ - +/* + * testdatefmtrange_si_LK.js - test the date range formatter object in Sri Lanka + * + * Copyright © 2017 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"); } @@ -35,657 +35,652 @@ module.exports.testdatefmtrange_si_LK = { testDateRngFmtLKRangeInDayShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-12-31 13.45 – 14.30"); + var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-12-31 13.45 – 14.30"); test.done(); }, testDateRngFmtLKRangeInDayMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeInDayLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeInDayFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, - testDateRngFmtLKRangeNextDayShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-12-30 13.45 – 2011-12-31 14.30"); + var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-12-30 13.45 – 2011-12-31 14.30"); test.done(); }, testDateRngFmtLKRangeNextDayMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeNextDayLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeNextDayFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, - testDateRngFmtLKRangeMultiDayShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-12-20 – 31"); + var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-12-20 – 31"); test.done(); }, testDateRngFmtLKRangeMultiDayMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeMultiDayLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeMultiDayFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, - testDateRngFmtLKRangeNextMonthShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-11-20 – 2011-12-31"); + var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-11-20 – 2011-12-31"); test.done(); }, testDateRngFmtLKRangeNextMonthMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeNextMonthLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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 – දෙසැම්බර් 31"); + var fmt = new DateRngFmt({locale: "si-LK", 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 – දෙසැම්බර් 31"); test.done(); }, testDateRngFmtLKRangeNextMonthFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, - testDateRngFmtLKRangeNextYearShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-11-20 – 2012-01-31"); + var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-11-20 – 2012-01-31"); test.done(); }, testDateRngFmtLKRangeNextYearMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeNextYearLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeNextYearFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, - testDateRngFmtLKRangeMultiYearShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-11 – 2014-01"); + var fmt = new DateRngFmt({locale: "si-LK", 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), "2011-11 – 2014-01"); test.done(); }, testDateRngFmtLKRangeMultiYearMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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 ජන"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeMultiYearLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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 ජනවාරි"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKRangeMultiYearFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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 ජනවාරි"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); }, testDateRngFmtLKManyYearsFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "si-LK", 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"); + var fmt = new DateRngFmt({locale: "si-LK", 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(); } }; diff --git a/js/test/daterange/testdatefmtrange_sk_SK.js b/js/test/daterange/testdatefmtrange_sk_SK.js index 13eeabff84..02ed2b9843 100644 --- a/js/test/daterange/testdatefmtrange_sk_SK.js +++ b/js/test/daterange/testdatefmtrange_sk_SK.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unskr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unskr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unskr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { @@ -23,24 +23,6 @@ if (typeof(GregorianDate) === "undefined") { if (typeof(DateRngFmt) === "undefined") { var DateRngFmt = require("../../lib/DateRngFmt.js"); } -/* - * testdatefmtrange_sk_SK.js - test the date range formatter object in German/Germany - * - * Copyright © 2012-2017, JEDLSoft - * - * Licensed unskr 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 unskr 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 unskr the License. - */ if (typeof(ilib) === "undefined") { var ilib = require("../../lib/ilib.js"); diff --git a/js/test/daterange/testdatefmtrange_sl_SI.js b/js/test/daterange/testdatefmtrange_sl_SI.js index dc0302b0ca..7d99ab1054 100644 --- a/js/test/daterange/testdatefmtrange_sl_SI.js +++ b/js/test/daterange/testdatefmtrange_sl_SI.js @@ -10,11 +10,11 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed unslr the License is distributed on an "AS IS" BASIS, + * 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 unslr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_sq_AL.js b/js/test/daterange/testdatefmtrange_sq_AL.js index 0360378f91..691e060b3a 100644 --- a/js/test/daterange/testdatefmtrange_sq_AL.js +++ b/js/test/daterange/testdatefmtrange_sq_AL.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unsqr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unsqr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unsqr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_sr_Latn_RS.js b/js/test/daterange/testdatefmtrange_sr_Latn_RS.js index f84a226106..981cbf4d40 100644 --- a/js/test/daterange/testdatefmtrange_sr_Latn_RS.js +++ b/js/test/daterange/testdatefmtrange_sr_Latn_RS.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unsr-Latnr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unsr-Latnr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unsr-Latnr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_sv_SE.js b/js/test/daterange/testdatefmtrange_sv_SE.js index 79b9203717..d0e3234864 100644 --- a/js/test/daterange/testdatefmtrange_sv_SE.js +++ b/js/test/daterange/testdatefmtrange_sv_SE.js @@ -4,17 +4,17 @@ * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance wsvh 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/licenssv/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unlsvs required by applicable law or agreed to in wrsving, software + * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, - * WSEHOUT WARRANTISE OR CONDSEIONS OF ANY KIND, esvher exprsvs or implied. + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and - * limsvations under the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_sw_KE.js b/js/test/daterange/testdatefmtrange_sw_KE.js index b40fc377a4..c42cf5e3f1 100644 --- a/js/test/daterange/testdatefmtrange_sw_KE.js +++ b/js/test/daterange/testdatefmtrange_sw_KE.js @@ -1,22 +1,22 @@ -/* - * testdatefmtrange_sw_KE.js - test the date range formatter object in Kenya - * - * Copyright © 2017,2017, 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. - */ - +/* + * testdatefmtrange_sw_KE.js - test the date range formatter object in Kenya + * + * Copyright © 2017, 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"); } @@ -35,657 +35,652 @@ module.exports.testdatefmtrange_sw_KE = { testDateRngFmtKERangeInDayShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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(); }, testDateRngFmtKERangeInDayMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Des 2011, 13:45 – 14:30"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Des 2011, 13:45 – 14:30"); test.done(); }, testDateRngFmtKERangeInDayLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 14:30"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 14:30"); test.done(); }, testDateRngFmtKERangeInDayFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 14:30"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 14:30"); test.done(); }, - testDateRngFmtKERangeNextDayShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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(); }, testDateRngFmtKERangeNextDayMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Des 2011, 13:45 – 31 Des 2011, 14:30"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Des 2011, 13:45 – 31 Des 2011, 14:30"); test.done(); }, testDateRngFmtKERangeNextDayLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 31 Desemba 2011 saa 14:30"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 31 Desemba 2011 saa 14:30"); test.done(); }, testDateRngFmtKERangeNextDayFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 31 Desemba 2011 saa 14:30"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011 saa 13:45 – 31 Desemba 2011 saa 14:30"); test.done(); }, - testDateRngFmtKERangeMultiDayShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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(); }, testDateRngFmtKERangeMultiDayMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Des 2011"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Des 2011"); test.done(); }, testDateRngFmtKERangeMultiDayLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011"); test.done(); }, testDateRngFmtKERangeMultiDayFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Desemba 2011"); test.done(); }, - testDateRngFmtKERangeNextMonthShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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(); }, testDateRngFmtKERangeNextMonthMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Nov – 31 Des 2011"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Nov – 31 Des 2011"); test.done(); }, testDateRngFmtKERangeNextMonthLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba – 31 Desemba 2011"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba – 31 Desemba 2011"); test.done(); }, testDateRngFmtKERangeNextMonthFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba – 31 Desemba 2011"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba – 31 Desemba 2011"); test.done(); }, - testDateRngFmtKERangeNextYearShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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/01/2012"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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/01/2012"); test.done(); }, testDateRngFmtKERangeNextYearMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Nov 2011 – 31 Jan 2012"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Nov 2011 – 31 Jan 2012"); test.done(); }, testDateRngFmtKERangeNextYearLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba 2011 – 31 Januari 2012"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba 2011 – 31 Januari 2012"); test.done(); }, testDateRngFmtKERangeNextYearFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba 2011 – 31 Januari 2012"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 Novemba 2011 – 31 Januari 2012"); test.done(); }, - testDateRngFmtKERangeMultiYearShort: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 – 01/2014"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 – 01/2014"); test.done(); }, testDateRngFmtKERangeMultiYearMedium: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 2011 – Jan 2014"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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 2011 – Jan 2014"); test.done(); }, testDateRngFmtKERangeMultiYearLong: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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), "Novemba 2011 – Januari 2014"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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), "Novemba 2011 – Januari 2014"); test.done(); }, testDateRngFmtKERangeMultiYearFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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), "Novemba 2011 – Januari 2014"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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), "Novemba 2011 – Januari 2014"); test.done(); }, testDateRngFmtKEManyYearsFull: function(test) { test.expect(2); - var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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"); + var fmt = new DateRngFmt({locale: "sw-Latn-KE", 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(); } }; diff --git a/js/test/daterange/testdatefmtrange_ta_IN.js b/js/test/daterange/testdatefmtrange_ta_IN.js index c424af4aac..ed87330807 100644 --- a/js/test/daterange/testdatefmtrange_ta_IN.js +++ b/js/test/daterange/testdatefmtrange_ta_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_ta_IN.js - test the date range formatter object in Tamil/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,11 +11,12 @@ * * 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. + * 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"); } diff --git a/js/test/daterange/testdatefmtrange_te_IN.js b/js/test/daterange/testdatefmtrange_te_IN.js index f44fceaeaf..3f15fb5a6c 100644 --- a/js/test/daterange/testdatefmtrange_te_IN.js +++ b/js/test/daterange/testdatefmtrange_te_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_te_IN.js - test the date range formatter object in Telugu/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_th_TH.js b/js/test/daterange/testdatefmtrange_th_TH.js index 9bf5c3e857..6c7c3df05c 100644 --- a/js/test/daterange/testdatefmtrange_th_TH.js +++ b/js/test/daterange/testdatefmtrange_th_TH.js @@ -7,7 +7,7 @@ * 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/LICENTH-2.0 + * 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, diff --git a/js/test/daterange/testdatefmtrange_tr_TR.js b/js/test/daterange/testdatefmtrange_tr_TR.js index b5e9870ad4..7bd1ea09f6 100644 --- a/js/test/daterange/testdatefmtrange_tr_TR.js +++ b/js/test/daterange/testdatefmtrange_tr_TR.js @@ -3,23 +3,20 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed untrr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 untrr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 untrr the License. + * limitations under the License. */ - - - if (typeof(GregorianDate) === "undefined") { var GregorianDate = require("../../lib/GregorianDate.js"); } diff --git a/js/test/daterange/testdatefmtrange_uk_UA.js b/js/test/daterange/testdatefmtrange_uk_UA.js index 2725a23f1a..1f03ee1b2c 100644 --- a/js/test/daterange/testdatefmtrange_uk_UA.js +++ b/js/test/daterange/testdatefmtrange_uk_UA.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unukr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unukr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unukr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/daterange/testdatefmtrange_ur_IN.js b/js/test/daterange/testdatefmtrange_ur_IN.js index 6424172243..5ef7ff9e81 100644 --- a/js/test/daterange/testdatefmtrange_ur_IN.js +++ b/js/test/daterange/testdatefmtrange_ur_IN.js @@ -1,7 +1,6 @@ /* * testdatefmtrange_ur_IN.js - test the date range formatter object in Urdu/India * - * * Copyright © 2012-2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,7 +11,7 @@ * * 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. + * 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. diff --git a/js/test/daterange/testdatefmtrange_uz_Cyrl_UZ.js b/js/test/daterange/testdatefmtrange_uz_Cyrl_UZ.js index c3a87abf43..3b61e1ea23 100644 --- a/js/test/daterange/testdatefmtrange_uz_Cyrl_UZ.js +++ b/js/test/daterange/testdatefmtrange_uz_Cyrl_UZ.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unuzr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unuzr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unuzr the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { @@ -23,24 +23,6 @@ if (typeof(GregorianDate) === "undefined") { if (typeof(DateRngFmt) === "undefined") { var DateRngFmt = require("../../lib/DateRngFmt.js"); } -/* - * testdatefmtrange_uz_Cyrl_UZ.js - test the date range formatter object in German/Germany - * - * Copyright © 2012-2017, JEDLSoft - * - * Licensed unuzr 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 unuzr 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 unuzr the License. - */ if (typeof(ilib) === "undefined") { var ilib = require("../../lib/ilib.js"); diff --git a/js/test/daterange/testdatefmtrange_uz_Latn_UZ.js b/js/test/daterange/testdatefmtrange_uz_Latn_UZ.js index 51ed1638d1..6ed9001e1b 100644 --- a/js/test/daterange/testdatefmtrange_uz_Latn_UZ.js +++ b/js/test/daterange/testdatefmtrange_uz_Latn_UZ.js @@ -3,22 +3,20 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unuzr the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unuzr the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unuzr the License. + * limitations under the License. */ - - if (typeof(GregorianDate) === "undefined") { var GregorianDate = require("../../lib/GregorianDate.js"); } diff --git a/js/test/daterange/testdatefmtrange_vi_VN.js b/js/test/daterange/testdatefmtrange_vi_VN.js index 4205ede668..031a7821b9 100644 --- a/js/test/daterange/testdatefmtrange_vi_VN.js +++ b/js/test/daterange/testdatefmtrange_vi_VN.js @@ -3,18 +3,18 @@ * * Copyright © 2012-2017, JEDLSoft * - * Licensed unvir the Apache License, Version 2.0 (the "License"); - * you may not use tens file except in compliance with the License. - * You may obtaiN a copy of the License at + * 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 unvir the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KinD, either express or implied. + * 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 unvir the License. + * limitations under the License. */ if (typeof(GregorianDate) === "undefined") { diff --git a/js/test/durfmt/testdurfmt2.js b/js/test/durfmt/testdurfmt2.js index 627b3ae8e8..737cc2b5f9 100644 --- a/js/test/durfmt/testdurfmt2.js +++ b/js/test/durfmt/testdurfmt2.js @@ -1,7 +1,7 @@ /* * testdurfmt2.js - test the duration formatter object * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -8994,6 +8994,47 @@ module.exports.testdurfmt2 = { test.equal(clockformatted_15[2], '15小时15分钟15秒'); test.equal(clockformatted_15[3], '15小时15分钟15秒') + test.done(); + }, + testDurFmt_ka_GE: 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: "ka-GE", 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(); } } diff --git a/js/test/durfmt/testdurfmt_si_LK.js b/js/test/durfmt/testdurfmt_si_LK.js index c7c3814292..59a7e9a89f 100644 --- a/js/test/durfmt/testdurfmt_si_LK.js +++ b/js/test/durfmt/testdurfmt_si_LK.js @@ -1,211 +1,202 @@ -/* - * testdurfmt_si-LK.js - test the duration formatter object - * - * Copyright © 2017,2017, 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(DurationFmt) === "undefined") { - var DurationFmt = require("../../lib/DurationFmt.js"); -} -if (typeof(ilib) === "undefined") { - var ilib = require("../../lib/ilib.js"); -} - -module.exports.testdurfmt_si_LK = { - setUp: function(callback) { - ilib.clearCache(); - callback(); - }, - - testDurFmtLKFormatShortDefaultStyle: function(test) { - test.expect(2); - var fmt = new DurationFmt({ - locale: "si-LK", - length: "short" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), 'ව 1, මා 1, ස 1, දි 1, පැය 1, මි 1, ත 1'); - test.done(); - }, - - testDurFmtLKFormatShortText: function(test) { - test.expect(2); - var fmt = new DurationFmt({ - locale: "si-LK", - length: "short", - style: "text" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), 'ව 1, මා 1, ස 1, දි 1, පැය 1, මි 1, ත 1'); - test.done(); - }, - - testDurFmtLKFormatShortClock: function(test) { - test.expect(2); - var fmt = new DurationFmt({ - locale: "si-LK", - length: "short", - style: "clock" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "ව 1, මා 1, ස 1, දි 1, 01.01.01"); - test.done(); - }, - - testDurFmtLKFormatMedium: function(test) { - test.expect(2); - var fmt = new DurationFmt({ - locale: "si-LK", - length: "medium" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), 'ව 1, මා 1, ස 1, දි 1, පැය 1, මි 1, ත 1'); - test.done(); - }, - - testDurFmtLKFormatLong: function(test) { - test.expect(2); - var fmt = new DurationFmt({ - locale: "si-LK", - length: "long" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "වසර 1, මාස 1, සති 1, දින 1, පැය 1, මිනි 1, තත් 1"); - test.done(); - }, - - testDurFmtLKFormatFull: function(test) { - test.expect(2); - var fmt = new DurationFmt({ - locale: "si-LK", - length: "full" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "වසර 1, මාස 1, සති 1, දින 1, පැය 1, මිනිත්තු 1, සහ තත්පර 1"); - test.done(); - }, - - - testDurFmtLKAsyncWithLocale: function(test) { - test.expect(2); - new DurationFmt({ - locale: "si-LK", - length: "full", - sync: false, - onLoad: function (fmt) { - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 2, - month: 2, - week: 2, - day: 2, - hour: 2, - minute: 2, - second: 2 - }); - test.equal(duration.toString(), "වසර 2, මාස 2, සති 2, දින 2, පැය 2, මිනිත්තු 2, සහ තත්පර 2"); - test.done(); - } - }); - }, - - testDurFmtLKFormatShortClockAsync: function(test) { - test.expect(2); - new DurationFmt({ - locale: "si-LK", - length: "short", - style: "clock", - sync: false, - onLoad: function (fmt) { - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "ව 1, මා 1, ස 1, දි 1, 01.01.01"); - test.done(); - } - }); - } - -}; +/* + * testdurfmt_si-LK.js - test the duration formatter object + * + * Copyright © 2017, 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(DurationFmt) === "undefined") { + var DurationFmt = require("../../lib/DurationFmt.js"); +} +if (typeof(ilib) === "undefined") { + var ilib = require("../../lib/ilib.js"); +} + +module.exports.testdurfmt_si_LK = { + setUp: function(callback) { + ilib.clearCache(); + callback(); + }, + + testDurFmtLKFormatShortDefaultStyle: function(test) { + test.expect(2); + var fmt = new DurationFmt({ + locale: "si-LK", + length: "short" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), 'ව 1, මා 1, ස 1, දි 1, පැය 1, මි 1, ත 1'); + test.done(); + }, + testDurFmtLKFormatShortText: function(test) { + test.expect(2); + var fmt = new DurationFmt({ + locale: "si-LK", + length: "short", + style: "text" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), 'ව 1, මා 1, ස 1, දි 1, පැය 1, මි 1, ත 1'); + test.done(); + }, + testDurFmtLKFormatShortClock: function(test) { + test.expect(2); + var fmt = new DurationFmt({ + locale: "si-LK", + length: "short", + style: "clock" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "ව 1, මා 1, ස 1, දි 1, 01.01.01"); + test.done(); + }, + testDurFmtLKFormatMedium: function(test) { + test.expect(2); + var fmt = new DurationFmt({ + locale: "si-LK", + length: "medium" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), 'ව 1, මා 1, ස 1, දි 1, පැය 1, මි 1, ත 1'); + test.done(); + }, + testDurFmtLKFormatLong: function(test) { + test.expect(2); + var fmt = new DurationFmt({ + locale: "si-LK", + length: "long" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "වසර 1, මාස 1, සති 1, දින 1, පැය 1, මිනි 1, තත් 1"); + test.done(); + }, + testDurFmtLKFormatFull: function(test) { + test.expect(2); + var fmt = new DurationFmt({ + locale: "si-LK", + length: "full" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "වසර 1, මාස 1, සති 1, දින 1, පැය 1, මිනිත්තු 1, සහ තත්පර 1"); + test.done(); + }, + testDurFmtLKAsyncWithLocale: function(test) { + test.expect(2); + new DurationFmt({ + locale: "si-LK", + length: "full", + sync: false, + onLoad: function (fmt) { + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 2, + month: 2, + week: 2, + day: 2, + hour: 2, + minute: 2, + second: 2 + }); + test.equal(duration.toString(), "වසර 2, මාස 2, සති 2, දින 2, පැය 2, මිනිත්තු 2, සහ තත්පර 2"); + test.done(); + } + }); + }, + testDurFmtLKFormatShortClockAsync: function(test) { + test.expect(2); + new DurationFmt({ + locale: "si-LK", + length: "short", + style: "clock", + sync: false, + onLoad: function (fmt) { + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "ව 1, මා 1, ස 1, දි 1, 01.01.01"); + test.done(); + } + }); + } +}; \ No newline at end of file diff --git a/js/test/durfmt/testdurfmt_sw_KE.js b/js/test/durfmt/testdurfmt_sw_KE.js index 5724a09549..16cc97285e 100644 --- a/js/test/durfmt/testdurfmt_sw_KE.js +++ b/js/test/durfmt/testdurfmt_sw_KE.js @@ -1,22 +1,22 @@ -/* - * testdurfmt_sw-KE.js - test the duration formatter object - * - * Copyright © 2017,2017, 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. - */ - +/* + * testdurfmt_sw-KE.js - test the duration formatter object + * + * Copyright © 2017, 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(DurationFmt) === "undefined") { var DurationFmt = require("../../lib/DurationFmt.js"); } @@ -32,180 +32,172 @@ module.exports.testdurfmt_sw_KE = { testDurFmtKEFormatShortDefaultStyle: function(test) { test.expect(2); - var fmt = new DurationFmt({ - locale: "sw-Latn-KE", - length: "short" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); + var fmt = new DurationFmt({ + locale: "sw-Latn-KE", + length: "short" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); test.done(); }, - testDurFmtKEFormatShortText: function(test) { test.expect(2); - var fmt = new DurationFmt({ - locale: "sw-Latn-KE", - length: "short", - style: "text" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); + var fmt = new DurationFmt({ + locale: "sw-Latn-KE", + length: "short", + style: "text" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); test.done(); }, - testDurFmtKEFormatShortClock: function(test) { test.expect(2); - var fmt = new DurationFmt({ - locale: "sw-Latn-KE", - length: "short", - style: "clock" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, 01:01:01"); + var fmt = new DurationFmt({ + locale: "sw-Latn-KE", + length: "short", + style: "clock" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, 01:01:01"); test.done(); }, - testDurFmtKEFormatMedium: function(test) { test.expect(2); - var fmt = new DurationFmt({ - locale: "sw-Latn-KE", - length: "medium" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); + var fmt = new DurationFmt({ + locale: "sw-Latn-KE", + length: "medium" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); test.done(); }, - testDurFmtKEFormatLong: function(test) { test.expect(2); - var fmt = new DurationFmt({ - locale: "sw-Latn-KE", - length: "long" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); + var fmt = new DurationFmt({ + locale: "sw-Latn-KE", + length: "long" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1, sekunde 1"); test.done(); }, - testDurFmtKEFormatFull: function(test) { test.expect(2); - var fmt = new DurationFmt({ - locale: "sw-Latn-KE", - length: "full" - }); - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1 na sekunde 1"); + var fmt = new DurationFmt({ + locale: "sw-Latn-KE", + length: "full" + }); + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, saa 1, dakika 1 na sekunde 1"); test.done(); }, - - testDurFmtKEAsyncWithLocale: function(test) { test.expect(2); - new DurationFmt({ - locale: "sw-Latn-KE", - length: "full", - sync: false, - onLoad: function (fmt) { - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 2, - month: 2, - week: 2, - day: 2, - hour: 2, - minute: 2, - second: 2 - }); - test.equal(duration.toString(), "miaka 2, miezi 2, wiki 2, siku 2, saa 2, dakika 2 na sekunde 2"); + new DurationFmt({ + locale: "sw-Latn-KE", + length: "full", + sync: false, + onLoad: function (fmt) { + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 2, + month: 2, + week: 2, + day: 2, + hour: 2, + minute: 2, + second: 2 + }); + test.equal(duration.toString(), "miaka 2, miezi 2, wiki 2, siku 2, saa 2, dakika 2 na sekunde 2"); test.done(); - } - }); + } + }); }, - testDurFmtKEFormatShortClockAsync: function(test) { test.expect(2); - new DurationFmt({ - locale: "sw-Latn-KE", - length: "short", - style: "clock", - sync: false, - onLoad: function (fmt) { - test.ok(fmt !== null); - - var duration = fmt.format({ - year: 1, - month: 1, - week: 1, - day: 1, - hour: 1, - minute: 1, - second: 1 - }); - test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, 01:01:01"); + new DurationFmt({ + locale: "sw-Latn-KE", + length: "short", + style: "clock", + sync: false, + onLoad: function (fmt) { + test.ok(fmt !== null); + + var duration = fmt.format({ + year: 1, + month: 1, + week: 1, + day: 1, + hour: 1, + minute: 1, + second: 1 + }); + test.equal(duration.toString(), "mwaka 1, mwezi 1, wiki 1, siku 1, 01:01:01"); test.done(); - } - }); + } + }); } }; diff --git a/js/test/name/testname_el.js b/js/test/name/testname_el.js index 773208957b..8e419d4f49 100644 --- a/js/test/name/testname_el.js +++ b/js/test/name/testname_el.js @@ -7,7 +7,7 @@ * 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/LICJASE-2.0 + * 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, diff --git a/js/test/name/testname_et.js b/js/test/name/testname_et.js index ac8c5ff7a9..b1f9c44089 100644 --- a/js/test/name/testname_et.js +++ b/js/test/name/testname_et.js @@ -7,7 +7,7 @@ * 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/LICJASE-2.0 + * 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, diff --git a/js/test/name/testname_fi.js b/js/test/name/testname_fi.js index ca0373a5c6..c9fec37616 100644 --- a/js/test/name/testname_fi.js +++ b/js/test/name/testname_fi.js @@ -7,7 +7,7 @@ * 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/LICJASE-2.0 + * 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, diff --git a/js/test/name/testname_ga.js b/js/test/name/testname_ga.js index 48df594665..c680d5ce76 100644 --- a/js/test/name/testname_ga.js +++ b/js/test/name/testname_ga.js @@ -7,7 +7,7 @@ * 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/LICJASE-2.0 + * 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, diff --git a/js/test/name/testname_id.js b/js/test/name/testname_id.js index 76ec26ae6e..f8da604506 100644 --- a/js/test/name/testname_id.js +++ b/js/test/name/testname_id.js @@ -7,7 +7,7 @@ * 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/LICJASE-2.0 + * 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, diff --git a/js/test/name/testname_ja.js b/js/test/name/testname_ja.js index 4d1743f7b5..bbc89ba802 100644 --- a/js/test/name/testname_ja.js +++ b/js/test/name/testname_ja.js @@ -7,7 +7,7 @@ * 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/LICJASE-2.0 + * 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, diff --git a/js/test/name/testname_ko.js b/js/test/name/testname_ko.js index 14727609aa..7ba16701d0 100644 --- a/js/test/name/testname_ko.js +++ b/js/test/name/testname_ko.js @@ -426,7 +426,7 @@ module.exports.testname_ko = { var formatted = fmt.format(name); test.ok(typeof(formatted) !== "undefined"); - var expected = "미스터 김동경"; + var expected = "김동경 , 박사"; test.equal(formatted, expected); test.done(); @@ -501,7 +501,7 @@ module.exports.testname_ko = { var formatted = fmt.format(name); test.ok(typeof(formatted) !== "undefined"); - var expected = "미스터 남궁동경"; + var expected = "남궁동경 씨"; test.equal(formatted, expected); test.done(); diff --git a/js/test/name/testnamefmt.js b/js/test/name/testnamefmt.js index 33428c0122..9fe12e6122 100644 --- a/js/test/name/testnamefmt.js +++ b/js/test/name/testnamefmt.js @@ -1,7 +1,7 @@ /* * testnamefmt.js - test the name formatter object * - * Copyright © 2013-2015,2017, JEDLSoft + * Copyright © 2013-2015,2017,2019 JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -165,7 +165,24 @@ module.exports.testnamefmt = { test.equal(fmt.format(name), "Mr. John Kevin Smith Phd."); test.done(); }, - + + testNameFmtENFamiliar: function(test) { + test.expect(1); + var name = new Name({ + prefix: "Mr.", + givenName: "John", + middleName: "Kevin", + familyName: "Smith", + suffix: "Phd." + }); + var fmt = new NameFmt({ + style: "familiar" + }); + + test.equal(fmt.format(name), "John"); + test.done(); + }, + testNameFmtENWithCommaInSuffix: function(test) { test.expect(1); var name = new Name({ @@ -383,7 +400,27 @@ module.exports.testnamefmt = { test.equal(fmt.format(name), "Hr. Andreas Helmut Schmidt MdB"); test.done(); }, - + + testNameFmtDEFamiliar: function(test) { + test.expect(1); + var name = new Name({ + prefix: "Hr.", + givenName: "Andreas", + middleName: "Helmut", + familyName: "Schmidt", + suffix: "MdB" + }, { + locale: "de-DE" + }); + var fmt = new NameFmt({ + style: "familiar", + locale: "de-DE" + }); + + test.equal(fmt.format(name), "Hr. Schmidt"); + test.done(); + }, + testNameFmtDEWithCommaInSuffix: function(test) { test.expect(1); var name = new Name({ @@ -672,11 +709,106 @@ module.exports.testnamefmt = { // use the full name, even in formal_short // honorifics are prefixes in Korean - test.equal(fmt.format(name), "닥터 박은성"); + test.equal(fmt.format(name), "박은성"); + test.done(); + }, + testNameFmtKOFormalShort2: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + style: "formal_short", + locale: "ko-KR" + }); + + // use the full name, even in formal_short + // honorifics are prefixes in Korean + test.equal(fmt.format(name), "박은성 님"); test.done(); }, - testNameFmtZHFormalLong: function(test) { + testNameFmtKOShort: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + locale: "ko-KR", + style: "short" + }); + test.equal(fmt.format(name), "박은성"); + test.done(); + }, + + testNameFmtKOMedium: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + locale: "ko-KR", + style: "medium" + }); + + test.equal(fmt.format(name), "박은성"); + test.done(); + }, + + testNameFmtKOLong: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + locale: "ko-KR", + style: "long" + }); + + test.equal(fmt.format(name), "박은성 님"); + test.done(); + }, + + testNameFmtKOFull: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + locale: "ko-KR", + style: "full" + }); + + test.equal(fmt.format(name), "닥터 박은성 님"); + test.done(); + }, + + testNameFmtKOFamiliar: function(test) { test.expect(1); var name = new Name({ honorific: "닥터", @@ -693,7 +825,97 @@ module.exports.testnamefmt = { test.equal(fmt.format(name), "닥터 박은성"); test.done(); }, - + + testNameFmtZHFormalLong2: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + style: "formal_long", + locale: "ko-KR" + }); + + test.equal(fmt.format(name), "닥터 박은성 님"); + test.done(); + }, + + testNameFmtKOFormalLong: function(test) { + test.expect(1); + var name = new Name({ + honorific: "닥터", + givenName: "은성", + familyName: "박", + suffix: "님" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + style: "familiar", + locale: "ko-KR" + }); + + test.equal(fmt.format(name), "박은성 님"); + test.done(); + }, + /*testNameFmtKOFamiliar2: function(test) { + test.expect(1); + var name = new Name({ + givenName: "은성", + familyName: "박" + }, { + locale: "ko-KR" + }); + var fmt = new NameFmt({ + style: "familiar", + locale: "ko-KR" + }); + + test.equal(fmt.format(name), "박은성 님"); + test.done(); + },*/ + + testNameFmtCSFamiliar: function(test) { + test.expect(1); + var name = new Name({ + honorific: "Pan", + givenName: "Jan", + familyName: "Novák" + }, { + locale: "cs-CZ" + }); + var fmt = new NameFmt({ + style: "familiar", + locale: "cs-CZ" + }); + + test.equal(fmt.format(name), "Pan Novák"); + test.done(); + }, + + testNameFmtSKFamiliar: function(test) { + test.expect(1); + var name = new Name({ + honorific: "Pani", + givenName: "Mária", + familyName: "Obecny" + }, { + locale: "sk-SK" + }); + var fmt = new NameFmt({ + style: "familiar", + locale: "sk-SK" + }); + + test.equal(fmt.format(name), "Pani Obecny"); + test.done(); + }, + testNameFmtENWithImplicitConversionOfArgToName: function(test) { test.expect(1); var fmt = new NameFmt({ diff --git a/js/test/number/testcurrency.js b/js/test/number/testcurrency.js index 699a3a1af0..4ebc9bedf3 100644 --- a/js/test/number/testcurrency.js +++ b/js/test/number/testcurrency.js @@ -1893,6 +1893,15 @@ module.exports.testcurrency = { test.equal(info.getCurrency(), "MYR"); + test.done(); + }, + testCurrency_ka_GE: function(test) { + test.expect(2); + var info = new LocaleInfo("ka-GE"); + test.ok(info !== null); + + test.equal(info.getCurrency(), "GEL"); + test.done(); } }; diff --git a/js/test/number/testnumfmt2.js b/js/test/number/testnumfmt2.js index d99d4dd200..ba6c3cc001 100644 --- a/js/test/number/testnumfmt2.js +++ b/js/test/number/testnumfmt2.js @@ -1,7 +1,7 @@ /* * testnumfmt2.js * - * Copyright © 2019, JEDLSoft + * Copyright © 2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3754,5 +3754,24 @@ module.exports.testnumfmt2 = { test.equal(li.getCurrencyFormats().commonNegative, "-{s}{n}"); test.equal(curfmt.format(57.05), "RM57.05"); //MYR test.done(); + }, + testNumFmt_ka_GE: function(test) { + test.expect(9); + var li = new LocaleInfo("ka-GE"); + var fmt = new NumFmt({locale:"ka-GE", 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:"ka-GE", 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: "ka-GE", 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 ₾"); //GEL + test.done(); } -} +} \ No newline at end of file diff --git a/js/test/root/testglobal.js b/js/test/root/testglobal.js index 3e528a8003..39bf973396 100644 --- a/js/test/root/testglobal.js +++ b/js/test/root/testglobal.js @@ -74,7 +74,7 @@ module.exports.testglobal = { return; } test.expect(1); - test.equal(ilib.getVersion().substring(0,4), "14.4"); + test.equal(ilib.getVersion().substring(0,4), "14.5"); test.done(); }, diff --git a/js/test/root/testlocaleinfo.js b/js/test/root/testlocaleinfo.js index ea45df91cb..b3bc1f2e94 100644 --- a/js/test/root/testlocaleinfo.js +++ b/js/test/root/testlocaleinfo.js @@ -1,7 +1,7 @@ /* * testlocaleinfo.js - test the locale info object * - * 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. @@ -13323,6 +13323,15 @@ module.exports.testlocaleinfo = { test.equal(info.getDelimiterQuotationStart(), "„"); test.equal(info.getDelimiterQuotationEnd(), "“"); test.done(); + }, + testLocaleInfoQuotation_ka_GE: function(test) { + test.expect(4); + var info = new LocaleInfo("ka-GE"); + test.ok(info !== null); + + test.equal(info.getDelimiterQuotationStart(), "„"); + test.equal(info.getDelimiterQuotationEnd(), "“"); + test.equal(info.getPaperSize(), "A4"); + test.done(); } - }; \ No newline at end of file diff --git a/js/test/root/testlocalematch.js b/js/test/root/testlocalematch.js index 5389ef9b5a..233e5ddc24 100644 --- a/js/test/root/testlocalematch.js +++ b/js/test/root/testlocalematch.js @@ -1,7 +1,7 @@ /* * testlocalematch.js - test the locale matcher object * - * Copyright © 2012-2015,2017,2019 JEDLSoft + * Copyright © 2012-2015,2017,2019-2020 JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1015,6 +1015,66 @@ module.exports.testlocalematch = { test.equal(locale.getSpec(), "ur-Arab-PK"); test.done(); }, + + testLocaleMatcherGetLikelyLocaleByLocaleCode58: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "hr-ME" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocale(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "hr-Latn-ME"); + test.done(); + }, + + testLocaleMatcherGetLikelyLocaleByLocaleCode59: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "Latn-ME" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocale(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "hr-Latn-ME"); + test.done(); + }, + + testLocaleMatcherGetLikelyLocaleByLocaleCode60: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "ka-GE" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocale(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "ka-Geor-GE"); + test.done(); + }, + testLocaleMatcherGetLikelyLocaleByLocaleCode61: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "GE" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocale(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "ka-Geor-GE"); + test.done(); + }, + + testLocaleMatcherGetLikelyLocaleByLocaleCode62: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "ka" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocale(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "ka-Geor-GE"); + test.done(); + }, + testLocaleMatcherMatchExactFullLocale: function(test) { test.expect(2); var lm = new LocaleMatcher({ @@ -1470,6 +1530,17 @@ module.exports.testlocalematch = { test.equal(locale.getSpec(), "ja-JP"); test.done(); }, + testLocaleMatcherGetLikelyLocaleMinimalByLanguage4: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "ka" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocaleMinimal(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "ka-GE"); + test.done(); + }, testLocaleMatcherGetLikelyLocaleMinimalUzbek: function(test) { test.expect(3); @@ -1602,6 +1673,17 @@ module.exports.testlocalematch = { test.equal(locale.getSpec(), "ru-RU"); test.done(); }, + testLocaleMatcherGetLikelyLocaleMinimalDefaultScriptForCountry4: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "GE" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocaleMinimal(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "ka-GE"); + test.done(); + }, testLocaleMatcherGetLikelyLocaleMinimalDefaultLocaleForScript1: function(test) { test.expect(3); @@ -1639,6 +1721,18 @@ module.exports.testlocalematch = { test.done(); }, + testLocaleMatcherGetLikelyLocaleMinimalDefaultLocaleForScript4: function(test) { + test.expect(3); + var lm = new LocaleMatcher({ + locale: "Geor" + }); + test.ok(typeof(lm) !== "undefined"); + var locale = lm.getLikelyLocaleMinimal(); + test.ok(typeof(locale) !== "undefined"); + test.equal(locale.getSpec(), "ka-GE"); + test.done(); + }, + testLocaleMatcherGetLikelyLocaleMinimalNonDefaultLocaleForScript1: function(test) { test.expect(3); var lm = new LocaleMatcher({ diff --git a/js/test/root/testscriptinfo.js b/js/test/root/testscriptinfo.js index cf53f1eabf..c686e0409e 100644 --- a/js/test/root/testscriptinfo.js +++ b/js/test/root/testscriptinfo.js @@ -1,7 +1,7 @@ /* * testscriptinfo.js - test the script info object * - * Copyright © 2013-2017, 2019 JEDLSoft + * Copyright © 2013-2017, 2019-2020 JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -2175,5 +2175,15 @@ module.exports.testscriptinfo = { test.equal(li.getScript(), "Hans"); test.equal(scinfo.getScriptDirection(), "ltr"); test.done(); + }, + testScriptInfo_ka_GE: function(test) { + test.expect(4); + var li = new LocaleInfo("ka-GE"); + var scinfo = new ScriptInfo(li.getScript()); + test.ok(li !== null); + test.ok(scinfo !== null); + test.equal(li.getScript(), "Geor"); + test.equal(scinfo.getScriptDirection(), "ltr"); + test.done(); } }; diff --git a/js/test/root/teststrings.js b/js/test/root/teststrings.js index c5ea963390..5f8fb378eb 100644 --- a/js/test/root/teststrings.js +++ b/js/test/root/teststrings.js @@ -1,7 +1,7 @@ /* * teststrings.js - test the String object * - * Copyright © 2012-2018, JEDLSoft + * Copyright © 2012-2019-2020, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1023,7 +1023,7 @@ module.exports.teststrings = { test.done(); }, - testStringDelegateToLowerCase: function(test) { + testStringDelegateToUpperCase: function(test) { test.expect(2); var str = new IString("abcdef"); @@ -1032,7 +1032,396 @@ module.exports.teststrings = { test.equal(str.toUpperCase(), "ABCDEF"); test.done(); }, + + testStringDelegateLength: function(test) { + test.expect(2); + var str = new IString("abcdef"); + test.ok(str !== null); + + test.equal(str.length, 6); + test.done(); + }, + + testStringDelegateMatchAll: function(test) { + if (typeof("".matchAll) === 'function') { + test.expect(13); + var str = new IString("abc bd bc ab ef bc"); + + test.ok(str !== null); + + var it = str.matchAll(/bc/g); + + test.ok(it); + + var match = it.next(); + test.ok(match); + test.ok(!match.done); + test.equal(match.value[0], "bc"); + + match = it.next(); + test.ok(match); + test.ok(!match.done); + test.equal(match.value[0], "bc"); + + match = it.next(); + test.ok(match); + test.ok(!match.done); + test.equal(match.value[0], "bc"); + + match = it.next(); + test.ok(match); + test.ok(match.done); + } else { + console.log("This version of the JS engine does not support String.matchAll()"); + } + test.done(); + }, + + testStringDelegateToLocaleLowerCase: function(test) { + if (typeof("".toLocaleLowerCase) === 'function') { + test.expect(2); + var str = new IString("ABCDEF"); + + test.ok(str !== null); + + test.equal(str.toLocaleLowerCase(), "abcdef"); + } else { + console.log("This version of the JS engine does not support String.toLocaleLowerCase()"); + } + test.done(); + }, + + testStringDelegateToLocaleUpperCase: function(test) { + if (typeof("".toLocaleUpperCase) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.equal(str.toLocaleUpperCase(), "ABCDEF"); + } else { + console.log("This version of the JS engine does not support String.toLocaleUpperCase()"); + } + test.done(); + }, + + testStringDelegateEndsWithTrue: function(test) { + if (typeof("".endsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.endsWith("def")); + } else { + console.log("This version of the JS engine does not support String.endsWith()"); + } + test.done(); + }, + + testStringDelegateEndsWithTrueWithLength1: function(test) { + if (typeof("".endsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.endsWith("def", str.length)); + } else { + console.log("This version of the JS engine does not support String.endsWith()"); + } + test.done(); + }, + + testStringDelegateEndsWithTrueWithLength2: function(test) { + if (typeof("".endsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.endsWith("def", undefined)); + } else { + console.log("This version of the JS engine does not support String.endsWith()"); + } + test.done(); + }, + + testStringDelegateEndsWithFalse: function(test) { + if (typeof("".endsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(!str.endsWith("de")); + } else { + console.log("This version of the JS engine does not support String.endsWith()"); + } + test.done(); + }, + + testStringDelegateEndsWithFalse2: function(test) { + if (typeof("".endsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(!str.endsWith("def", 3)); + } else { + console.log("This version of the JS engine does not support String.endsWith()"); + } + test.done(); + }, + + testStringDelegateStartsWithTrue: function(test) { + if (typeof("".startsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.startsWith("abc")); + } else { + console.log("This version of the JS engine does not support String.startsWith()"); + } + test.done(); + }, + + testStringDelegateStartsWithLength1: function(test) { + if (typeof("".startsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.startsWith("abc", 0)); + } else { + console.log("This version of the JS engine does not support String.startsWith()"); + } + test.done(); + }, + testStringDelegateStartsWithLength2: function(test) { + if (typeof("".startsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.startsWith("abc", undefined)); + } else { + console.log("This version of the JS engine does not support String.startsWith()"); + } + test.done(); + }, + + + testStringDelegateStartsWithFalse: function(test) { + if (typeof("".startsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(!str.startsWith("bc")); + } else { + console.log("This version of the JS engine does not support String.startsWith()"); + } + test.done(); + }, + + testStringDelegateStartsWithFalse2: function(test) { + if (typeof("".startsWith) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(!str.startsWith("ab", 4)); + } else { + console.log("This version of the JS engine does not support String.startsWith()"); + } + test.done(); + }, + + testStringDelegateIncludesTrue: function(test) { + if (typeof("".includes) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(str.includes("bcd")); + } else { + console.log("This version of the JS engine does not support String.includes()"); + } + test.done(); + }, + + testStringDelegateIncludesFalse: function(test) { + if (typeof("".includes) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.ok(!str.includes("bcf")); + } else { + console.log("This version of the JS engine does not support String.includes()"); + } + test.done(); + }, + + testStringDelegateNormalize: function(test) { + if (typeof("".normalize) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.equal(str.normalize("NFKC"), "abcdef"); + } else { + console.log("This version of the JS engine does not support String.normalize()"); + } + test.done(); + }, + + testStringDelegatePadEnd: function(test) { + if (typeof("".padEnd) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.equal(str.padEnd(12, "x"), "abcdefxxxxxx"); + } else { + console.log("This version of the JS engine does not support String.padEnd()"); + } + test.done(); + }, + + testStringDelegatePadStart: function(test) { + if (typeof("".padStart) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.equal(str.padStart(11, "x"), "xxxxxabcdef"); + } else { + console.log("This version of the JS engine does not support String.padStart()"); + } + test.done(); + }, + + testStringDelegateRepeat: function(test) { + if (typeof("".repeat) === 'function') { + + test.expect(2); + var str = new IString("abcdef"); + + test.ok(str !== null); + + test.equal(str.repeat(3), "abcdefabcdefabcdef"); + } else { + console.log("This version of the JS engine does not support String.repeat()"); + } + test.done(); + }, + + testStringDelegateTrim: function(test) { + if (typeof("".trim) === 'function') { + + test.expect(2); + var str = new IString(" \r \n abcdef \t \t"); + + test.ok(str !== null); + + test.equal(str.trim(), "abcdef"); + } else { + console.log("This version of the JS engine does not support String.trim()"); + } + test.done(); + }, + + testStringDelegateTrimEnd: function(test) { + if (typeof("".trimEnd) === 'function') { + + test.expect(2); + var str = new IString(" \r \n abcdef \t \t"); + + test.ok(str !== null); + + test.equal(str.trimEnd(), " \r \n abcdef"); + } else { + console.log("This version of the JS engine does not support String.trimEnd()"); + } + test.done(); + }, + + testStringDelegateTrimRight: function(test) { + if (typeof("".trimRight) === 'function') { + + test.expect(2); + var str = new IString(" \r \n abcdef \t \t"); + + test.ok(str !== null); + + test.equal(str.trimRight(), " \r \n abcdef"); + } else { + console.log("This version of the JS engine does not support String.trimRight()"); + } + test.done(); + }, + + testStringDelegateTrimStart: function(test) { + if (typeof("".trimStart) === 'function') { + + test.expect(2); + var str = new IString(" \r \n abcdef \t \t"); + + test.ok(str !== null); + + test.equal(str.trimStart(), "abcdef \t \t"); + } else { + console.log("This version of the JS engine does not support String.trimStart()"); + } + test.done(); + }, + + testStringDelegateTrimLeft: function(test) { + if (typeof("".trimLeft) === 'function') { + + test.expect(2); + var str = new IString(" \r \n abcdef \t \t"); + + test.ok(str !== null); + + test.equal(str.trimLeft(), "abcdef \t \t"); + } else { + console.log("This version of the JS engine does not support String.trimLeft()"); + } + test.done(); + }, + testCodePointToUTF: function(test) { test.expect(3); var str = IString.fromCodePoint(0x10302); @@ -2698,18 +3087,58 @@ module.exports.teststrings = { test.equal(str.formatChoice(1), "There items are one"); test.done(); }, + testStringFormatChoiceCharClasses16: function(test) { + test.expect(2); + var str = new IString("one#There items are one|few#The items are few|many#The items are many|#Default items"); + str.setLocale("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(0), "Default items"); + test.done(); + }, + testStringFormatChoiceCharClasses17: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(0), "There are no items."); + test.done(); + }, + testStringFormatChoiceCharClasses18: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(1), "There items are one"); + test.done(); + }, + testStringFormatChoiceCharClasses19: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(15), "Default items"); + test.done(); + }, testStringFormatChoiceCharClassesComplex1: 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("pl-PL"); - + test.ok(str !== null); - + test.equal(str.formatChoice(1), "There items are one"); test.done(); }, - + testStringFormatChoiceCharClassesComplex2: 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"); @@ -2819,14 +3248,36 @@ module.exports.teststrings = { test.equal(str.formatChoice(10), "Default items"); test.done(); }, + + testStringFormatChoiceCharClassesComplex12: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(10), "Default items"); + test.done(); + }, + + testStringFormatChoiceCharClassesComplex12: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(1), "There items are one"); + test.done(); + }, testStringFormatChoiceDecimal1: 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("ar-EG"); - + test.ok(str !== null); - + test.equal(str.formatChoice(8.0), "The items are few"); test.done(); }, @@ -2835,13 +3286,13 @@ module.exports.teststrings = { 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(); }, - + testStringFormatChoiceDecimal3: 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"); @@ -2974,7 +3425,6 @@ module.exports.teststrings = { test.done(); }, - testStringFormatChoiceDecimal15: 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"); @@ -2984,6 +3434,35 @@ module.exports.teststrings = { test.equal(str.formatChoice(1.5), "Default items"); test.done(); + }, + testStringFormatChoiceDecimal16: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(1.5), "Default items"); + test.done(); + }, + testStringFormatChoiceDecimal17: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(1.0), "There items are one"); + test.done(); + }, + testStringFormatChoiceDecimal18: 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("ka-GE"); + + test.ok(str !== null); + + test.equal(str.formatChoice(0.0), "There are no 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 315e05f0b2..ea49ebf3d4 100644 --- a/js/test/strings-ext/testSuite.html +++ b/js/test/strings-ext/testSuite.html @@ -31,7 +31,7 @@ exports: {} }; - + diff --git a/js/test/strings-ext/testSuiteFiles.js b/js/test/strings-ext/testSuiteFiles.js index 9630cef908..b290555e25 100644 --- a/js/test/strings-ext/testSuiteFiles.js +++ b/js/test/strings-ext/testSuiteFiles.js @@ -36,6 +36,7 @@ module.exports.files = [ "testlistfmt_hr.js", "testlistfmt_it.js", "testlistfmt_ja_JP.js", + "testlistfmt_ka_GE.js", "testlistfmt_kn_IN.js", "testlistfmt_ml_IN.js", "testlistfmt_mr_IN.js", diff --git a/js/test/strings-ext/testlistfmt_am_ET.js b/js/test/strings-ext/testlistfmt_am_ET.js index 6773108b63..af526507e5 100644 --- a/js/test/strings-ext/testlistfmt_am_ET.js +++ b/js/test/strings-ext/testlistfmt_am_ET.js @@ -1,7 +1,7 @@ /* * testlistfmt_am_ET.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ar.js b/js/test/strings-ext/testlistfmt_ar.js index 7889073fa8..98b629dd5e 100644 --- a/js/test/strings-ext/testlistfmt_ar.js +++ b/js/test/strings-ext/testlistfmt_ar.js @@ -1,7 +1,7 @@ /* * testlistfmt_ar.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_bs.js b/js/test/strings-ext/testlistfmt_bs.js index 36f0fea885..26352fcc3b 100644 --- a/js/test/strings-ext/testlistfmt_bs.js +++ b/js/test/strings-ext/testlistfmt_bs.js @@ -1,7 +1,7 @@ /* * testlistfmt_bs.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_de.js b/js/test/strings-ext/testlistfmt_de.js index 36065a6804..9b088910d8 100644 --- a/js/test/strings-ext/testlistfmt_de.js +++ b/js/test/strings-ext/testlistfmt_de.js @@ -1,7 +1,7 @@ /* * testlistfmt_de.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_el.js b/js/test/strings-ext/testlistfmt_el.js index 6767b9abb9..d3bdf72719 100644 --- a/js/test/strings-ext/testlistfmt_el.js +++ b/js/test/strings-ext/testlistfmt_el.js @@ -1,7 +1,7 @@ /* * testlistfmt_el.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_en.js b/js/test/strings-ext/testlistfmt_en.js index 94e511f023..1ec2db588e 100644 --- a/js/test/strings-ext/testlistfmt_en.js +++ b/js/test/strings-ext/testlistfmt_en.js @@ -1,7 +1,7 @@ /* * testlistfmt_en.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_es.js b/js/test/strings-ext/testlistfmt_es.js index 36a0f22e0e..59deb216f5 100644 --- a/js/test/strings-ext/testlistfmt_es.js +++ b/js/test/strings-ext/testlistfmt_es.js @@ -1,7 +1,7 @@ /* * testlistfmt_es.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_fa.js b/js/test/strings-ext/testlistfmt_fa.js index b14d0786bc..b7e940839e 100644 --- a/js/test/strings-ext/testlistfmt_fa.js +++ b/js/test/strings-ext/testlistfmt_fa.js @@ -1,7 +1,7 @@ /* * testlistfmt_fa.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_fr.js b/js/test/strings-ext/testlistfmt_fr.js index 26513a4760..0fbed8acac 100644 --- a/js/test/strings-ext/testlistfmt_fr.js +++ b/js/test/strings-ext/testlistfmt_fr.js @@ -1,7 +1,7 @@ /* * testlistfmt_fr.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_gu_IN.js b/js/test/strings-ext/testlistfmt_gu_IN.js index ddc7b281d1..83885b1cd2 100644 --- a/js/test/strings-ext/testlistfmt_gu_IN.js +++ b/js/test/strings-ext/testlistfmt_gu_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_gu_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_he_IL.js b/js/test/strings-ext/testlistfmt_he_IL.js index 1c8392163d..2c739b48e0 100644 --- a/js/test/strings-ext/testlistfmt_he_IL.js +++ b/js/test/strings-ext/testlistfmt_he_IL.js @@ -1,7 +1,7 @@ /* * testlistfmt_he_IL.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_hi_IN.js b/js/test/strings-ext/testlistfmt_hi_IN.js index 653d1610c7..835952f3b6 100644 --- a/js/test/strings-ext/testlistfmt_hi_IN.js +++ b/js/test/strings-ext/testlistfmt_hi_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_hi_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_hr.js b/js/test/strings-ext/testlistfmt_hr.js index 24a35ca7f6..5a8930a40b 100644 --- a/js/test/strings-ext/testlistfmt_hr.js +++ b/js/test/strings-ext/testlistfmt_hr.js @@ -1,7 +1,7 @@ /* * testlistfmt_hr.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_it.js b/js/test/strings-ext/testlistfmt_it.js index 53b4c4543f..ab8ad78e6e 100644 --- a/js/test/strings-ext/testlistfmt_it.js +++ b/js/test/strings-ext/testlistfmt_it.js @@ -1,7 +1,7 @@ /* * testlistfmt_el.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ja_JP.js b/js/test/strings-ext/testlistfmt_ja_JP.js index 2ebc6e841f..c0e51f101f 100644 --- a/js/test/strings-ext/testlistfmt_ja_JP.js +++ b/js/test/strings-ext/testlistfmt_ja_JP.js @@ -1,7 +1,7 @@ /* * testlistfmt_ja_JP.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ka_GE.js b/js/test/strings-ext/testlistfmt_ka_GE.js new file mode 100644 index 0000000000..d6f4f0a385 --- /dev/null +++ b/js/test/strings-ext/testlistfmt_ka_GE.js @@ -0,0 +1,253 @@ +/* + * testlistfmt_ka_GE.js - test the list formatter object + * + * 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(ListFmt) === "undefined") { + var ListFmt = require("../../lib/ListFmt.js"); +} + +if (typeof(ilib) === "undefined") { + var ilib = require("../../lib/ilib.js"); +} + +module.exports.testlistfmt_ka_GE = { + setUp: function(callback) { + ilib.clearCache(); + callback(); + }, + testListFmtkaGENumberFormatOne: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი"]), "ერთი"); + test.done(); + }, + testListFmtkaGENumberFormatTwo: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი"]), "ერთი და ორი"); + test.done(); + }, + testListFmtkaGENumberFormatThree: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი"]), "ერთი, ორი და სამი"); + test.done(); + }, + testListFmtkaGENumberFormatFour: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი"]), "ერთი, ორი, სამი და ოთხი"); + test.done(); + }, + testListFmtkaGENumberFormatFive: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი", "ხუთი"]), "ერთი, ორი, სამი, ოთხი და ხუთი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatOneShort: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი"]), "ერთი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatTwoShort: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი"]), "ერთი, ორი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatThreeShort: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი"]), "ერთი, ორი, სამი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatFourShort: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი"]), "ერთი, ორი, სამი, ოთხი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatFiveShort: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი", "ხუთი"]), "ერთი, ორი, სამი, ოთხი, ხუთი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatOneFull: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit", + length: "full" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი"]), "ერთი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatTwoFull: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit", + length: "full" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი"]), "ერთი, ორი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatThreeFull: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit", + length: "full" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი"]), "ერთი, ორი, სამი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatFourFull: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit", + length: "full" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი"]), "ერთი, ორი, სამი, ოთხი"); + test.done(); + }, + testListFmtUnitStylekaGENumberFormatFiveFull: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "unit", + length: "full" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი", "ხუთი"]), "ერთი, ორი, სამი, ოთხი, ხუთი"); + test.done(); + }, + testListFmtORStylekaGENumberFormatOne: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი"]), "ერთი"); + test.done(); + }, + testListFmtORStylekaGENumberFormatTwo: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი"]), "ერთი ან ორი"); + test.done(); + }, + testListFmtORStylekaGENumberFormatThree: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი"]), "ერთი, ორი ან სამი"); + test.done(); + }, + testListFmtORStylekaGENumberFormatFour: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი"]), "ერთი, ორი, სამი ან ოთხი"); + test.done(); + }, + testListFmtORStylekaGENumberFormatFiveFull: function(test) { + var fmt = new ListFmt({ + locale: "ka-GE", + style: "disjunction" + }); + + test.expect(2); + test.ok(fmt !== null); + test.equal(fmt.format(["ერთი", "ორი", "სამი", "ოთხი", "ხუთი"]), "ერთი, ორი, სამი, ოთხი ან ხუთი"); + test.done(); + } +}; \ No newline at end of file diff --git a/js/test/strings-ext/testlistfmt_kn_IN.js b/js/test/strings-ext/testlistfmt_kn_IN.js index fdc141c8d8..78ddc6a6d4 100644 --- a/js/test/strings-ext/testlistfmt_kn_IN.js +++ b/js/test/strings-ext/testlistfmt_kn_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_kn_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ml_IN.js b/js/test/strings-ext/testlistfmt_ml_IN.js index ec0b3000ed..73b18f5e2f 100644 --- a/js/test/strings-ext/testlistfmt_ml_IN.js +++ b/js/test/strings-ext/testlistfmt_ml_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_ml_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_mr_IN.js b/js/test/strings-ext/testlistfmt_mr_IN.js index a9a00ae6c4..60d3a2a1e1 100644 --- a/js/test/strings-ext/testlistfmt_mr_IN.js +++ b/js/test/strings-ext/testlistfmt_mr_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_mr_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ms.js b/js/test/strings-ext/testlistfmt_ms.js index 866ba96fb9..f6b780afda 100644 --- a/js/test/strings-ext/testlistfmt_ms.js +++ b/js/test/strings-ext/testlistfmt_ms.js @@ -1,7 +1,7 @@ /* * testlistfmt_ms.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_nb_NO.js b/js/test/strings-ext/testlistfmt_nb_NO.js index 518108b2a3..341f08abd8 100644 --- a/js/test/strings-ext/testlistfmt_nb_NO.js +++ b/js/test/strings-ext/testlistfmt_nb_NO.js @@ -1,7 +1,7 @@ /* * testlistfmt_nb_NO.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_nl.js b/js/test/strings-ext/testlistfmt_nl.js index a4737a8416..db8a0d4c2d 100644 --- a/js/test/strings-ext/testlistfmt_nl.js +++ b/js/test/strings-ext/testlistfmt_nl.js @@ -1,7 +1,7 @@ /* * testlistfmt_nl.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_pa.js b/js/test/strings-ext/testlistfmt_pa.js index 823caf4844..8cbd62c4bb 100644 --- a/js/test/strings-ext/testlistfmt_pa.js +++ b/js/test/strings-ext/testlistfmt_pa.js @@ -1,7 +1,7 @@ /* * testlistfmt_pa.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_pt.js b/js/test/strings-ext/testlistfmt_pt.js index fca1bedc50..9443d147ed 100644 --- a/js/test/strings-ext/testlistfmt_pt.js +++ b/js/test/strings-ext/testlistfmt_pt.js @@ -1,7 +1,7 @@ /* * testlistfmt_pt.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ru.js b/js/test/strings-ext/testlistfmt_ru.js index 2885792086..c85e9749a8 100644 --- a/js/test/strings-ext/testlistfmt_ru.js +++ b/js/test/strings-ext/testlistfmt_ru.js @@ -1,7 +1,7 @@ /* * testlistfmt_ru.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_si_LK.js b/js/test/strings-ext/testlistfmt_si_LK.js index 017530d8a4..72e324c579 100644 --- a/js/test/strings-ext/testlistfmt_si_LK.js +++ b/js/test/strings-ext/testlistfmt_si_LK.js @@ -1,7 +1,7 @@ /* * testlistfmt_si_LK.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_sq.js b/js/test/strings-ext/testlistfmt_sq.js index 8560899c00..6de00aa051 100644 --- a/js/test/strings-ext/testlistfmt_sq.js +++ b/js/test/strings-ext/testlistfmt_sq.js @@ -1,7 +1,7 @@ /* * testlistfmt_sq.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_sr.js b/js/test/strings-ext/testlistfmt_sr.js index d0ee27342d..82c1d6ba0c 100644 --- a/js/test/strings-ext/testlistfmt_sr.js +++ b/js/test/strings-ext/testlistfmt_sr.js @@ -1,7 +1,7 @@ /* * testlistfmt_sr.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_sv.js b/js/test/strings-ext/testlistfmt_sv.js index dffddc9eb1..5fa85bb8c1 100644 --- a/js/test/strings-ext/testlistfmt_sv.js +++ b/js/test/strings-ext/testlistfmt_sv.js @@ -1,7 +1,7 @@ /* * testlistfmt_sv.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ta_IN.js b/js/test/strings-ext/testlistfmt_ta_IN.js index bb2e9452e8..70d8312f56 100644 --- a/js/test/strings-ext/testlistfmt_ta_IN.js +++ b/js/test/strings-ext/testlistfmt_ta_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_ta_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_te_IN.js b/js/test/strings-ext/testlistfmt_te_IN.js index ef4601c6d0..59818232c9 100644 --- a/js/test/strings-ext/testlistfmt_te_IN.js +++ b/js/test/strings-ext/testlistfmt_te_IN.js @@ -1,7 +1,7 @@ /* * testlistfmt_te_IN.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_th_TH.js b/js/test/strings-ext/testlistfmt_th_TH.js index facae3cdd7..13e005f179 100644 --- a/js/test/strings-ext/testlistfmt_th_TH.js +++ b/js/test/strings-ext/testlistfmt_th_TH.js @@ -1,7 +1,7 @@ /* * testlistfmt_th_TH.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_tr.js b/js/test/strings-ext/testlistfmt_tr.js index 53ea380ef7..acbe51a441 100644 --- a/js/test/strings-ext/testlistfmt_tr.js +++ b/js/test/strings-ext/testlistfmt_tr.js @@ -1,7 +1,7 @@ /* * testlistfmt_tr.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_uk_UA.js b/js/test/strings-ext/testlistfmt_uk_UA.js index 8479046663..9649cb9b1b 100644 --- a/js/test/strings-ext/testlistfmt_uk_UA.js +++ b/js/test/strings-ext/testlistfmt_uk_UA.js @@ -1,7 +1,7 @@ /* * testlistfmt_uk_UA.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_ur.js b/js/test/strings-ext/testlistfmt_ur.js index 041f1d0cda..53f4a75f89 100644 --- a/js/test/strings-ext/testlistfmt_ur.js +++ b/js/test/strings-ext/testlistfmt_ur.js @@ -1,7 +1,7 @@ /* * testlistfmt_ur.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/js/test/strings-ext/testlistfmt_zh.js b/js/test/strings-ext/testlistfmt_zh.js index c3e7e1fe13..6b69bbd818 100644 --- a/js/test/strings-ext/testlistfmt_zh.js +++ b/js/test/strings-ext/testlistfmt_zh.js @@ -1,7 +1,7 @@ /* * testlistfmt_zh.js - test the list formatter object * - * Copyright © 2017,2017, JEDLSoft + * Copyright © 2017, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/package.json b/package.json index b367ae7412..98007d5a1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ilib", - "version": "14.4.0", + "version": "14.5.0", "main": "js/index.js", "description": "iLib is a cross-engine library of internationalization (i18n) classes written in pure JS", "keywords": [ diff --git a/tools/cldr/likelyLocalesAdditional.json b/tools/cldr/likelyLocalesAdditional.json index 09d8143869..7d3f5802d6 100644 --- a/tools/cldr/likelyLocalesAdditional.json +++ b/tools/cldr/likelyLocalesAdditional.json @@ -254,6 +254,7 @@ "zxx": "zxx-Latn-XX", "ar-Hebr": "ar-Hebr-IL", "fr-CA": "fr-Latn-CA", + "hr-ME": "hr-Latn-ME", "Afak": "djk-Afak-SR", "Aran": "fa-Aran-IR", "Cyrs": "ru-Cyrs-RU",