1 //! moment.js locale configuration
2 //! locale : Klingon (tlh)
3 //! author : Dominika Kruk : https://github.com/amaranthrose
5 ;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['moment'], factory) :
10 }(this, function (moment) { 'use strict';
13 var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
15 function translateFuture(output) {
17 time = (output.indexOf('jaj') !== -1) ?
18 time.slice(0, -3) + 'leS' :
19 (output.indexOf('jar') !== -1) ?
20 time.slice(0, -3) + 'waQ' :
21 (output.indexOf('DIS') !== -1) ?
22 time.slice(0, -3) + 'nem' :
27 function translatePast(output) {
29 time = (output.indexOf('jaj') !== -1) ?
30 time.slice(0, -3) + 'Hu’' :
31 (output.indexOf('jar') !== -1) ?
32 time.slice(0, -3) + 'wen' :
33 (output.indexOf('DIS') !== -1) ?
34 time.slice(0, -3) + 'ben' :
39 function translate(number, withoutSuffix, string, isFuture) {
40 var numberNoun = numberAsNoun(number);
43 return numberNoun + ' tup';
45 return numberNoun + ' rep';
47 return numberNoun + ' jaj';
49 return numberNoun + ' jar';
51 return numberNoun + ' DIS';
55 function numberAsNoun(number) {
56 var hundred = Math.floor((number % 1000) / 100),
57 ten = Math.floor((number % 100) / 10),
61 word += numbersNouns[hundred] + 'vatlh';
64 word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
67 word += ((word !== '') ? ' ' : '') + numbersNouns[one];
69 return (word === '') ? 'pagh' : word;
72 var tlh = moment.defineLocale('tlh', {
73 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('_'),
74 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('_'),
75 monthsParseExact : true,
76 weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
77 weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
78 weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
84 LLL : 'D MMMM YYYY HH:mm',
85 LLLL : 'dddd, D MMMM YYYY HH:mm'
88 sameDay: '[DaHjaj] LT',
89 nextDay: '[wa’leS] LT',
91 lastDay: '[wa’Hu’] LT',
96 future : translateFuture,
110 ordinalParse: /\d{1,2}\./,
113 dow : 1, // Monday is the first day of the week.
114 doy : 4 // The week that contains Jan 4th is the first week of the year.