jdk/src/java.base/share/classes/sun/util/calendar/BaseCalendar.java
changeset 31061 fead7d86d75f
parent 25859 3317bb8137f4
equal deleted inserted replaced
31060:be4eb6360ee0 31061:fead7d86d75f
    26 package sun.util.calendar;
    26 package sun.util.calendar;
    27 
    27 
    28 import java.util.TimeZone;
    28 import java.util.TimeZone;
    29 
    29 
    30 /**
    30 /**
    31  * The <code>BaseCalendar</code> provides basic calendar calculation
    31  * The {@code BaseCalendar} provides basic calendar calculation
    32  * functions to support the Julian, Gregorian, and Gregorian-based
    32  * functions to support the Julian, Gregorian, and Gregorian-based
    33  * calendar systems.
    33  * calendar systems.
    34  *
    34  *
    35  * @author Masayoshi Okutsu
    35  * @author Masayoshi Okutsu
    36  * @since 1.5
    36  * @since 1.5
   288     }
   288     }
   289 
   289 
   290     /**
   290     /**
   291      * Returns 366 if the specified date is in a leap year, or 365
   291      * Returns 366 if the specified date is in a leap year, or 365
   292      * otherwise This method does not perform the normalization with
   292      * otherwise This method does not perform the normalization with
   293      * the specified <code>CalendarDate</code>. The
   293      * the specified {@code CalendarDate}. The
   294      * <code>CalendarDate</code> must be normalized to get a correct
   294      * {@code CalendarDate} must be normalized to get a correct
   295      * value.
   295      * value.
   296      *
   296      *
   297      * @param a <code>CalendarDate</code>
   297      * @param date a {@code CalendarDate}
   298      * @return a year length in days
   298      * @return a year length in days
   299      * @throws ClassCastException if the specified date is not a
   299      * @throws ClassCastException if the specified date is not a
   300      * {@link BaseCalendar.Date}
   300      * {@link BaseCalendar.Date}
   301      */
   301      */
   302     public int getYearLength(CalendarDate date) {
   302     public int getYearLength(CalendarDate date) {
   410         return days;
   410         return days;
   411     }
   411     }
   412 
   412 
   413     /**
   413     /**
   414      * Calculates calendar fields and store them in the specified
   414      * Calculates calendar fields and store them in the specified
   415      * <code>CalendarDate</code>.
   415      * {@code CalendarDate}.
   416      */
   416      */
   417     // should be 'protected'
   417     // should be 'protected'
   418     public void getCalendarDateFromFixedDate(CalendarDate date,
   418     public void getCalendarDateFromFixedDate(CalendarDate date,
   419                                              long fixedDate) {
   419                                              long fixedDate) {
   420         Date gdate = (Date) date;
   420         Date gdate = (Date) date;