// author : Aggelos Karalias : https://github.com/mehiel
require('../moment').lang('el', {
- months : "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
+ monthsNominativeEl : "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
+ monthsGenitiveEl : "Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),
+ months : function (momentToFormat, format) {
+ if (/D/.test(format.substring(0, format.indexOf("MMMM")))) { // if there is a day number before 'MMMM'
+ return this._monthsGenitiveEl[momentToFormat.month()];
+ } else {
+ return this._monthsNominativeEl[momentToFormat.month()];
+ }
+ },
monthsShort : "Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),
weekdays : "Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),
weekdaysShort : "Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
+ calendarEl : {
+ sameDay : '[Σήμερα {}] LT',
+ nextDay : '[Αύριο {}] LT',
+ nextWeek : 'dddd [{}] LT',
+ lastDay : '[Χθες {}] LT',
+ lastWeek : '[την προηγούμενη] dddd [{}] LT',
+ sameElse : 'L'
+ },
calendar : function (key, mom) {
- var _calendar_el = {
- sameDay : '[Σήμερα {}] LT',
- nextDay : '[Αύριο {}] LT',
- nextWeek : 'dddd [{}] LT',
- lastDay : '[Χθες {}] LT',
- lastWeek : '[την προηγούμενη] dddd [{}] LT',
- sameElse : 'L'
- },
- output = _calendar_el[key],
+ var output = this._calendarEl[key],
hours = mom && mom.hours();
return output.replace("{}", (hours % 12 === 1 ? "στη" : "στις"));
},
"format" : function(test) {
- test.expect(22);
+ test.expect(24);
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'Κυριακή, Φεβρουάριος 14η 2010, 3:25:50 μμ'],
+ ['dddd, D MMMM YYYY, h:mm:ss a', 'Κυριακή, 14 Φεβρουαρίου 2010, 3:25:50 μμ'],
['ddd, hA', 'Κυρ, 3ΜΜ'],
+ ['dddd, MMMM YYYY', 'Κυριακή, Φεβρουάριος 2010'],
['M Mo MM MMMM MMM', '2 2η 02 Φεβρουάριος Φεβ'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14η 14'],
['a A', 'μμ ΜΜ'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45η day of the year'],
['L', '14/02/2010'],
- ['LL', '14 ΦεβÏ\81οÏ\85άÏ\81ιοÏ\82 2010'],
- ['LLL', '14 ΦεβÏ\81οÏ\85άÏ\81ιοÏ\82 2010 3:25 ΜΜ'],
- ['LLLL', 'Î\9aÏ\85Ï\81ιακή, 14 ΦεβÏ\81οÏ\85άÏ\81ιοÏ\82 2010 3:25 ΜΜ'],
+ ['LL', '14 ΦεβÏ\81οÏ\85αÏ\81ίοÏ\85 2010'],
+ ['LLL', '14 ΦεβÏ\81οÏ\85αÏ\81ίοÏ\85 2010 3:25 ΜΜ'],
+ ['LLLL', 'Î\9aÏ\85Ï\81ιακή, 14 ΦεβÏ\81οÏ\85αÏ\81ίοÏ\85 2010 3:25 ΜΜ'],
['l', '14/2/2010'],
['ll', '14 Φεβ 2010'],
['lll', '14 Φεβ 2010 3:25 ΜΜ'],