OxCalendar: fix localized centuries/millennia

This commit is contained in:
rlx 2013-07-22 08:39:11 +00:00
parent ba1a0d5ebc
commit 82638e1d45

View file

@ -152,8 +152,8 @@ Ox.Calendar = function(options, self) {
},
name: function(i) {
return i > -2
? Ox._('{0} Millennium', Ox.formatOrdinal(i + 2))
: Ox._('{0} Millennium BC', Ox.formatOrdinal(-i - 1))
? Ox._('{0} Millennium', [Ox.formatOrdinal(i + 2)])
: Ox._('{0} Millennium BC', [Ox.formatOrdinal(-i - 1)])
},
value: function(date) {
return Math.floor(date.getUTCFullYear() / 1000) - 1;
@ -167,8 +167,8 @@ Ox.Calendar = function(options, self) {
},
name: function(i) {
return i > -20
? Ox._('{0} Century', Ox.formatOrdinal(i + 20))
: Ox._('{0} Century BC', Ox.formatOrdinal(-i - 19))
? Ox._('{0} Century', [Ox.formatOrdinal(i + 20)])
: Ox._('{0} Century BC', [Ox.formatOrdinal(-i - 19)])
},
value: function(date) {
return Math.floor(date.getUTCFullYear() / 100) - 19;