jquery/globalize — Issue #87: Incorrect Era offset value in Japanese calendar
Author: nhotta
Created: 2012-01-04 18:17:06+00:00
State: open

Globalize.culture( "ja" );
Globalize.culture().calendar = Globalize.culture().calendars.Japanese;
console.log(Globalize.format(new Date(), 'F'));

The year value (1st number) is 45 instead of expected value 24 (tested on Jan. 4 2012).
In the culture definition, there are 4 era defined, the offsets of the 1st and 4th have to be swapped.
So the 1st element's offset is supposed to be 1988 and the last one is 1867.

Also in the Era definition, 'start' values seem to be wrong, such as -1812153600000 for the 2nd element.

Regarding Era switching, Japanese Era does not change at year boundary, for example the current era started in Jan. 1988 but the initial few days belong to the previous Era. Does globalize script supports year and month based Era definition?

Naoki