diff --git a/icu4c/source/i18n/gregocal.cpp b/icu4c/source/i18n/gregocal.cpp index 5fd71d496c8..ec14abbbf10 100644 --- a/icu4c/source/i18n/gregocal.cpp +++ b/icu4c/source/i18n/gregocal.cpp @@ -610,14 +610,6 @@ GregorianCalendar::monthLength(int32_t month, int32_t year) const // ------------------------------------- -int32_t -GregorianCalendar::yearLength(int32_t year) const -{ - return isLeapYear(year) ? 366 : 365; -} - -// ------------------------------------- - int32_t GregorianCalendar::yearLength() const { @@ -626,24 +618,6 @@ GregorianCalendar::yearLength() const // ------------------------------------- -/** -* After adjustments such as add(MONTH), add(YEAR), we don't want the -* month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar -* 3, we want it to go to Feb 28. Adjustments which might run into this -* problem call this method to retain the proper month. -*/ -void -GregorianCalendar::pinDayOfMonth() -{ - int32_t monthLen = monthLength(internalGetMonth()); - int32_t dom = internalGet(UCAL_DATE); - if(dom > monthLen) - set(UCAL_DATE, monthLen); -} - -// ------------------------------------- - - UBool GregorianCalendar::validateFields() const { diff --git a/icu4c/source/i18n/unicode/gregocal.h b/icu4c/source/i18n/unicode/gregocal.h index b85deb5ecfb..ab5a9c15716 100644 --- a/icu4c/source/i18n/unicode/gregocal.h +++ b/icu4c/source/i18n/unicode/gregocal.h @@ -536,14 +536,6 @@ public: virtual int32_t monthLength(int32_t month, int32_t year) const; #ifndef U_HIDE_INTERNAL_API - /** - * return the length of the given year. - * @param year the given year. - * @return the length of the given year. - * @internal - */ - int32_t yearLength(int32_t year) const; - /** * return the length of the year field. * @return the length of the year field @@ -551,14 +543,6 @@ public: */ int32_t yearLength(void) const; - /** - * After adjustments such as add(MONTH), add(YEAR), we don't want the - * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar - * 3, we want it to go to Feb 28. Adjustments which might run into this - * problem call this method to retain the proper month. - * @internal - */ - void pinDayOfMonth(void); #endif /* U_HIDE_INTERNAL_API */ /**