OxCalendar: fix localized centuries/millennia
This commit is contained in:
parent
ba1a0d5ebc
commit
82638e1d45
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue