ThreeTen / threeten

This project was the home of code used to develop a modern date and time library for JDK8. Development has moved to OpenJDK and a separate backport project, threetenbp.
http://threeten.github.io/
191 stars 37 forks source link

Description of JapaneseChronology day-of-Year #307

Closed RogerRiggs closed 11 years ago

RogerRiggs commented 11 years ago

The description of DAY_OF_YEAR in ChronoField is sufficient and refers to the Chronology where appropriate. For the JapaneseChronology, a description of the behavior should be added to dateYearDay(era, yearOfEra, dayOfYear such as: "The day-of-year for year-of-era 1 is counted from the first day of the era; for subsequent years, it is counted from the month 1, day 1."

RogerRiggs commented 11 years ago

Extracted from #299

jodastephen commented 11 years ago
    /**
     * The day-of-year.
     * <p>
     * This represents the concept of the day within the year.
     * In the default ISO calendar system, this has values from 1 to 365 in standard
     * years and 1 to 366 in leap years.
     * <p>
     * Non-ISO calendar systems should implement this field using the most recognized
     * day-of-year values for users of the calendar system.
     * Normally, this is a count of days from 1 to the length of the year.
     * <p>
     * Note that a non-ISO calendar system may have year numbering system that changes
     * at a different point to the natural reset in the month numbering. An example
     * of this is the Japanese calendar system where a change of era, which resets
     * the year number to 1, can happen on any date. The era and year reset also cause
     * the day-of-year to be reset to 1, but not the month-of-year or day-of-month.
     */
RogerRiggs commented 11 years ago

Looks ok.

jodastephen commented 11 years ago

Fixed by http://hg.openjdk.java.net/threeten/threeten/jdk/rev/a0490e4a8874