ICU-3659 update year limits

X-SVN-Rev: 15587
This commit is contained in:
Alan Liu 2004-05-27 20:39:56 +00:00
parent 8be9a28c55
commit 76b0325a05

View File

@ -66,11 +66,17 @@ static const int32_t kMonthLength[]
static const int32_t kLeapMonthLength[]
= {31,29,31,30,31,30,31,31,30,31,30,31}; // 0-based
// actual limits, imposed by setTimeInMillis(), are approximately:
// ms=+183882168921600000 jd=7f000000 Tuesday, December 20, 5828963 12:00:00 AM GMT
// ms=-184303902528000000 jd=81000000 Sunday, September 20, 5838270 12:00:00 AM GMT
#define MAX_YEAR 5838300
static const int32_t kGregorianCalendarLimits[UCAL_FIELD_COUNT][4] = {
// Minimum Greatest Least Maximum
// Minimum Maximum
{ 0, 0, 1, 1 }, // ERA
{ 1, 1, 140742, 144683 }, // YEAR
{ 1, 1, MAX_YEAR, MAX_YEAR }, // YEAR
{ 0, 0, 11, 11 }, // MONTH
{ 1, 1, 52, 53 }, // WEEK_OF_YEAR
{ 0, 0, 4, 6 }, // WEEK_OF_MONTH
@ -86,9 +92,9 @@ static const int32_t kGregorianCalendarLimits[UCAL_FIELD_COUNT][4] = {
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// MILLISECOND
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// ZONE_OFFSET
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// DST_OFFSET
{ -140742, -140742, 140742, 144683 }, // YEAR_WOY
{ -MAX_YEAR, -MAX_YEAR, MAX_YEAR, MAX_YEAR }, // YEAR_WOY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// DOW_LOCAL
{ -140742, -140742, 140742, 144683 }, // EXTENDED_YEAR
{ -MAX_YEAR, -MAX_YEAR, MAX_YEAR, MAX_YEAR }, // EXTENDED_YEAR
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1},// JULIAN_DAY
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1} // MILLISECONDS_IN_DAY
};