Brought in another asset for Ray's eye form: moment
[openemr.git] / public / assets / moment-2-13-0 / src / locale / tlh.js
blob1e75f774614b326b930b5150ea5301ad1929b1d3
1 //! moment.js locale configuration
2 //! locale : Klingon (tlh)
3 //! author : Dominika Kruk : https://github.com/amaranthrose
5 import moment from '../moment';
7 var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
9 function translateFuture(output) {
10     var time = output;
11     time = (output.indexOf('jaj') !== -1) ?
12         time.slice(0, -3) + 'leS' :
13         (output.indexOf('jar') !== -1) ?
14         time.slice(0, -3) + 'waQ' :
15         (output.indexOf('DIS') !== -1) ?
16         time.slice(0, -3) + 'nem' :
17         time + ' pIq';
18     return time;
21 function translatePast(output) {
22     var time = output;
23     time = (output.indexOf('jaj') !== -1) ?
24         time.slice(0, -3) + 'Hu’' :
25         (output.indexOf('jar') !== -1) ?
26         time.slice(0, -3) + 'wen' :
27         (output.indexOf('DIS') !== -1) ?
28         time.slice(0, -3) + 'ben' :
29         time + ' ret';
30     return time;
33 function translate(number, withoutSuffix, string, isFuture) {
34     var numberNoun = numberAsNoun(number);
35     switch (string) {
36         case 'mm':
37             return numberNoun + ' tup';
38         case 'hh':
39             return numberNoun + ' rep';
40         case 'dd':
41             return numberNoun + ' jaj';
42         case 'MM':
43             return numberNoun + ' jar';
44         case 'yy':
45             return numberNoun + ' DIS';
46     }
49 function numberAsNoun(number) {
50     var hundred = Math.floor((number % 1000) / 100),
51         ten = Math.floor((number % 100) / 10),
52         one = number % 10,
53         word = '';
54     if (hundred > 0) {
55         word += numbersNouns[hundred] + 'vatlh';
56     }
57     if (ten > 0) {
58         word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
59     }
60     if (one > 0) {
61         word += ((word !== '') ? ' ' : '') + numbersNouns[one];
62     }
63     return (word === '') ? 'pagh' : word;
66 export default moment.defineLocale('tlh', {
67     months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),
68     monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),
69     monthsParseExact : true,
70     weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
71     weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
72     weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
73     longDateFormat : {
74         LT : 'HH:mm',
75         LTS : 'HH:mm:ss',
76         L : 'DD.MM.YYYY',
77         LL : 'D MMMM YYYY',
78         LLL : 'D MMMM YYYY HH:mm',
79         LLLL : 'dddd, D MMMM YYYY HH:mm'
80     },
81     calendar : {
82         sameDay: '[DaHjaj] LT',
83         nextDay: '[wa’leS] LT',
84         nextWeek: 'LLL',
85         lastDay: '[wa’Hu’] LT',
86         lastWeek: 'LLL',
87         sameElse: 'L'
88     },
89     relativeTime : {
90         future : translateFuture,
91         past : translatePast,
92         s : 'puS lup',
93         m : 'wa’ tup',
94         mm : translate,
95         h : 'wa’ rep',
96         hh : translate,
97         d : 'wa’ jaj',
98         dd : translate,
99         M : 'wa’ jar',
100         MM : translate,
101         y : 'wa’ DIS',
102         yy : translate
103     },
104     ordinalParse: /\d{1,2}\./,
105     ordinal : '%d.',
106     week : {
107         dow : 1, // Monday is the first day of the week.
108         doy : 4  // The week that contains Jan 4th is the first week of the year.
109     }