ICU-4567 Removed unnecessary virtual method implementations in Taiwan/Buddhist calendar.

X-SVN-Rev: 22415
This commit is contained in:
Yoshito Umaoka 2007-08-17 03:38:53 +00:00
parent 2552d04edc
commit f4a7861584
4 changed files with 2 additions and 84 deletions

View File

@ -61,26 +61,6 @@ const char *BuddhistCalendar::getType() const
return "buddhist";
}
int32_t
BuddhistCalendar::getMaximum(UCalendarDateFields field) const
{
if(field == UCAL_ERA) {
return kMaxEra;
} else {
return GregorianCalendar::getMaximum(field);
}
}
int32_t
BuddhistCalendar::getLeastMaximum(UCalendarDateFields field) const
{
if(field == UCAL_ERA) {
return kMaxEra;
} else {
return GregorianCalendar::getLeastMaximum(field);
}
}
int32_t BuddhistCalendar::handleGetExtendedYear()
{
// EXTENDED_YEAR in BuddhistCalendar is a Gregorian year.

View File

@ -128,26 +128,6 @@ public:
*/
virtual const char * getType() const;
/**
* Gets the maximum value for the given time field. e.g. for DAY_OF_MONTH,
* 31.
*
* @param field The given time field.
* @return The maximum value for the given time field.
* @draft ICU 2.6
*/
int32_t getMaximum(UCalendarDateFields field) const;
/**
* Gets the lowest maximum value for the given field if varies. Otherwise same as
* getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
*
* @param field The given time field.
* @return The lowest maximum value for the given time field.
* @draft ICU 2.6
*/
int32_t getLeastMaximum(UCalendarDateFields field) const;
private:
BuddhistCalendar(); // default constructor not implemented

View File

@ -25,8 +25,6 @@ U_NAMESPACE_BEGIN
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TaiwanCalendar)
static const int32_t kMaxEra = 1; // 1 eras
static const int32_t kTaiwanEraStart = 1911; // 1911 (Gregorian)
static const int32_t kGregorianEpoch = 1970;
@ -62,26 +60,6 @@ const char *TaiwanCalendar::getType() const
return "taiwan";
}
int32_t
TaiwanCalendar::getMaximum(UCalendarDateFields field) const
{
if(field == UCAL_ERA) {
return kMaxEra;
} else {
return GregorianCalendar::getMaximum(field);
}
}
int32_t
TaiwanCalendar::getLeastMaximum(UCalendarDateFields field) const
{
if(field == UCAL_ERA) {
return kMaxEra;
} else {
return GregorianCalendar::getLeastMaximum(field);
}
}
int32_t TaiwanCalendar::handleGetExtendedYear()
{
// EXTENDED_YEAR in TaiwanCalendar is a Gregorian year
@ -92,7 +70,7 @@ int32_t TaiwanCalendar::handleGetExtendedYear()
&& newerField(UCAL_EXTENDED_YEAR, UCAL_ERA) == UCAL_EXTENDED_YEAR) {
year = internalGet(UCAL_EXTENDED_YEAR, kGregorianEpoch);
} else {
int32_t era = internalGetEra();
int32_t era = internalGet(UCAL_ERA, MINGUO);
if(era == MINGUO) {
year = internalGet(UCAL_YEAR, 1) + kTaiwanEraStart;
} else if(era == BEFORE_MINGUO) {

View File

@ -125,26 +125,6 @@ public:
*/
virtual const char * getType() const;
/**
* Gets the maximum value for the given time field. e.g. for DAY_OF_MONTH,
* 31.
*
* @param field The given time field.
* @return The maximum value for the given time field.
* @draft ICU 2.6
*/
int32_t getMaximum(UCalendarDateFields field) const;
/**
* Gets the lowest maximum value for the given field if varies. Otherwise same as
* getMaximum(). e.g., for Gregorian DAY_OF_MONTH, 28.
*
* @param field The given time field.
* @return The lowest maximum value for the given time field.
* @draft ICU 2.6
*/
int32_t getLeastMaximum(UCalendarDateFields field) const;
private:
TaiwanCalendar(); // default constructor not implemented