1 |
|
2 |
|
3 |
|
4 |
|
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) :
|
9 | factory(global.moment)
|
10 | }(this, (function (moment) { 'use strict';
|
11 |
|
12 |
|
13 |
|
14 | function isFunction(input) {
|
15 | return (
|
16 | (typeof Function !== 'undefined' && input instanceof Function) ||
|
17 | Object.prototype.toString.call(input) === '[object Function]'
|
18 | );
|
19 | }
|
20 |
|
21 | var el = moment.defineLocale('el', {
|
22 | monthsNominativeEl:
|
23 | 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(
|
24 | '_'
|
25 | ),
|
26 | monthsGenitiveEl:
|
27 | 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(
|
28 | '_'
|
29 | ),
|
30 | months: function (momentToFormat, format) {
|
31 | if (!momentToFormat) {
|
32 | return this._monthsNominativeEl;
|
33 | } else if (
|
34 | typeof format === 'string' &&
|
35 | /D/.test(format.substring(0, format.indexOf('MMMM')))
|
36 | ) {
|
37 |
|
38 | return this._monthsGenitiveEl[momentToFormat.month()];
|
39 | } else {
|
40 | return this._monthsNominativeEl[momentToFormat.month()];
|
41 | }
|
42 | },
|
43 | monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
|
44 | weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(
|
45 | '_'
|
46 | ),
|
47 | weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
|
48 | weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
|
49 | meridiem: function (hours, minutes, isLower) {
|
50 | if (hours > 11) {
|
51 | return isLower ? 'μμ' : 'ΜΜ';
|
52 | } else {
|
53 | return isLower ? 'πμ' : 'ΠΜ';
|
54 | }
|
55 | },
|
56 | isPM: function (input) {
|
57 | return (input + '').toLowerCase()[0] === 'μ';
|
58 | },
|
59 | meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
|
60 | longDateFormat: {
|
61 | LT: 'h:mm A',
|
62 | LTS: 'h:mm:ss A',
|
63 | L: 'DD/MM/YYYY',
|
64 | LL: 'D MMMM YYYY',
|
65 | LLL: 'D MMMM YYYY h:mm A',
|
66 | LLLL: 'dddd, D MMMM YYYY h:mm A',
|
67 | },
|
68 | calendarEl: {
|
69 | sameDay: '[Σήμερα {}] LT',
|
70 | nextDay: '[Αύριο {}] LT',
|
71 | nextWeek: 'dddd [{}] LT',
|
72 | lastDay: '[Χθες {}] LT',
|
73 | lastWeek: function () {
|
74 | switch (this.day()) {
|
75 | case 6:
|
76 | return '[το προηγούμενο] dddd [{}] LT';
|
77 | default:
|
78 | return '[την προηγούμενη] dddd [{}] LT';
|
79 | }
|
80 | },
|
81 | sameElse: 'L',
|
82 | },
|
83 | calendar: function (key, mom) {
|
84 | var output = this._calendarEl[key],
|
85 | hours = mom && mom.hours();
|
86 | if (isFunction(output)) {
|
87 | output = output.apply(mom);
|
88 | }
|
89 | return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');
|
90 | },
|
91 | relativeTime: {
|
92 | future: 'σε %s',
|
93 | past: '%s πριν',
|
94 | s: 'λίγα δευτερόλεπτα',
|
95 | ss: '%d δευτερόλεπτα',
|
96 | m: 'ένα λεπτό',
|
97 | mm: '%d λεπτά',
|
98 | h: 'μία ώρα',
|
99 | hh: '%d ώρες',
|
100 | d: 'μία μέρα',
|
101 | dd: '%d μέρες',
|
102 | M: 'ένας μήνας',
|
103 | MM: '%d μήνες',
|
104 | y: 'ένας χρόνος',
|
105 | yy: '%d χρόνια',
|
106 | },
|
107 | dayOfMonthOrdinalParse: /\d{1,2}η/,
|
108 | ordinal: '%dη',
|
109 | week: {
|
110 | dow: 1,
|
111 | doy: 4,
|
112 | },
|
113 | });
|
114 |
|
115 | return el;
|
116 |
|
117 | })));
|