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