ICU-2424 limit fixes
X-SVN-Rev: 14012
This commit is contained in:
parent
f67d795773
commit
3031d44d3c
@ -189,9 +189,9 @@ static const int32_t LIMITS[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
|
||||
{ -5000001, -5000001, 5000001, 5000001 }, // YEAR_WOY
|
||||
{ 1, 1, 5000001, 5000001 }, // YEAR_WOY
|
||||
{/*N/A*/-1,/*N/A*/-1,/*N/A*/-1,/*N/A*/-1}, // DOW_LOCAL
|
||||
{ -5000000, -5000000, 5000000, 5000000 }, // EXTENDED_YEAR
|
||||
{ 1, 1, 5000000, 5000000 }, // 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
|
||||
};
|
||||
|
@ -511,6 +511,20 @@ int32_t JapaneseCalendar::handleGetLimit(UCalendarDateFields field, ELimitType l
|
||||
case UCAL_ERA:
|
||||
return gJapanCalendarLimits[field][limitType];
|
||||
|
||||
case UCAL_EXTENDED_YEAR: // extended year limits
|
||||
switch(limitType) {
|
||||
case UCAL_LIMIT_GREATEST_MINIMUM:
|
||||
case UCAL_LIMIT_MINIMUM:
|
||||
return kEraInfo[0].year; /* minimum is 1st era year */
|
||||
|
||||
case UCAL_LIMIT_LEAST_MAXIMUM:
|
||||
case UCAL_LIMIT_MAXIMUM:
|
||||
/* use Gregorian calendar max */
|
||||
default:
|
||||
return GregorianCalendar::handleGetLimit(field,limitType);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
return GregorianCalendar::handleGetLimit(field,limitType);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user