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';
12 //! moment.js locale configuration
14 var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
16 function translateFuture(output) {
19 output.indexOf('jaj') !== -1
20 ? time.slice(0, -3) + 'leS'
21 : output.indexOf('jar') !== -1
22 ? time.slice(0, -3) + 'waQ'
23 : output.indexOf('DIS') !== -1
24 ? time.slice(0, -3) + 'nem'
29 function translatePast(output) {
32 output.indexOf('jaj') !== -1
33 ? time.slice(0, -3) + 'Hu’'
34 : output.indexOf('jar') !== -1
35 ? time.slice(0, -3) + 'wen'
36 : output.indexOf('DIS') !== -1
37 ? time.slice(0, -3) + 'ben'
42 function translate(number, withoutSuffix, string, isFuture) {
43 var numberNoun = numberAsNoun(number);
46 return numberNoun + ' lup';
48 return numberNoun + ' tup';
50 return numberNoun + ' rep';
52 return numberNoun + ' jaj';
54 return numberNoun + ' jar';
56 return numberNoun + ' DIS';
60 function numberAsNoun(number) {
61 var hundred = Math.floor((number % 1000) / 100),
62 ten = Math.floor((number % 100) / 10),
66 word += numbersNouns[hundred] + 'vatlh';
69 word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';
72 word += (word !== '' ? ' ' : '') + numbersNouns[one];
74 return word === '' ? 'pagh' : word;
77 var tlh = moment.defineLocale('tlh', {
78 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(
81 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(
84 monthsParseExact: true,
85 weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
88 weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
91 weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(
99 LLL: 'D MMMM YYYY HH:mm',
100 LLLL: 'dddd, D MMMM YYYY HH:mm',
103 sameDay: '[DaHjaj] LT',
104 nextDay: '[wa’leS] LT',
106 lastDay: '[wa’Hu’] LT',
111 future: translateFuture,
126 dayOfMonthOrdinalParse: /\d{1,2}\./,
129 dow: 1, // Monday is the first day of the week.
130 doy: 4, // The week that contains Jan 4th is the first week of the year.