Indicate the actual version of HHVM in use
[lhc/web/wiklou.git] / resources / lib / moment / lang / hy-am.js
1 // moment.js language configuration
2 // language : Armenian (hy-am)
3 // author : Armendarabyan : https://github.com/armendarabyan
4
5 (function (factory) {
6 if (typeof define === 'function' && define.amd) {
7 define(['moment'], factory); // AMD
8 } else if (typeof exports === 'object') {
9 module.exports = factory(require('../moment')); // Node
10 } else {
11 factory(window.moment); // Browser global
12 }
13 }(function (moment) {
14
15 function monthsCaseReplace(m, format) {
16 var months = {
17 'nominative': 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_'),
18 'accusative': 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_')
19 },
20
21 nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
22 'accusative' :
23 'nominative';
24
25 return months[nounCase][m.month()];
26 }
27
28 function monthsShortCaseReplace(m, format) {
29 var monthsShort = 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_');
30
31 return monthsShort[m.month()];
32 }
33
34 function weekdaysCaseReplace(m, format) {
35 var weekdays = 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_');
36
37 return weekdays[m.day()];
38 }
39
40 return moment.lang('hy-am', {
41 months : monthsCaseReplace,
42 monthsShort : monthsShortCaseReplace,
43 weekdays : weekdaysCaseReplace,
44 weekdaysShort : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
45 weekdaysMin : "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
46 longDateFormat : {
47 LT : "HH:mm",
48 L : "DD.MM.YYYY",
49 LL : "D MMMM YYYY թ.",
50 LLL : "D MMMM YYYY թ., LT",
51 LLLL : "dddd, D MMMM YYYY թ., LT"
52 },
53 calendar : {
54 sameDay: '[այսօր] LT',
55 nextDay: '[վաղը] LT',
56 lastDay: '[երեկ] LT',
57 nextWeek: function () {
58 return 'dddd [օրը ժամը] LT';
59 },
60 lastWeek: function () {
61 return '[անցած] dddd [օրը ժամը] LT';
62 },
63 sameElse: 'L'
64 },
65 relativeTime : {
66 future : "%s հետո",
67 past : "%s առաջ",
68 s : "մի քանի վայրկյան",
69 m : "րոպե",
70 mm : "%d րոպե",
71 h : "ժամ",
72 hh : "%d ժամ",
73 d : "օր",
74 dd : "%d օր",
75 M : "ամիս",
76 MM : "%d ամիս",
77 y : "տարի",
78 yy : "%d տարի"
79 },
80
81 meridiem : function (hour) {
82 if (hour < 4) {
83 return "գիշերվա";
84 } else if (hour < 12) {
85 return "առավոտվա";
86 } else if (hour < 17) {
87 return "ցերեկվա";
88 } else {
89 return "երեկոյան";
90 }
91 },
92
93 ordinal: function (number, period) {
94 switch (period) {
95 case 'DDD':
96 case 'w':
97 case 'W':
98 case 'DDDo':
99 if (number === 1) {
100 return number + '-ին';
101 }
102 return number + '-րդ';
103 default:
104 return number;
105 }
106 },
107
108 week : {
109 dow : 1, // Monday is the first day of the week.
110 doy : 7 // The week that contains Jan 1st is the first week of the year.
111 }
112 });
113 }));