Class ISOChronology
- All Implemented Interfaces:
Serializable
,Calendrical
ISOChronology follows the rules of the Gregorian calendar for all time. Thus, dates is the past, and particularly before 1583, may not correspond to historical documents.
ISOChronology is immutable and thread-safe.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Rule implementation.(package private) static final class
Rule implementation.(package private) static final class
Rule implementation.(package private) static final class
Rule implementation.(package private) static final class
Rule implementation.(package private) static final class
Rule implementation.(package private) static final class
Single rule subclass, which means fewer classes to load at startup.(package private) static final class
Single unit subclass, which means fewer classes to load at startup. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ISOChronology.Unit
Period unit for 12 hours half-days, used by AM/PM.private static final ISOChronology.Unit
Period unit for 24 hour fixed length days.private static final ISOChronology.Unit
Period unit for centuries.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for days.(package private) static final long
The number of days from year zero to year 1970.(package private) static final long
The number of days from year zero to the Modified Julian Day epoch of 1858-11-17.(package private) static final int
The number of days in a 400 year cycle.private static final ISOChronology.Unit
Period unit for decades.private static final ISOChronology.Unit
Period unit for eras.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for hours.static final ISOChronology
The singleton instance ofISOChronology
.static final int
Constant for the maximum week-based-year.private static final ISOChronology.Unit
Period unit for microseconds.private static final ISOChronology.Unit
Period unit for millennia.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for milliseconds.static final int
Constant for the minimum week-based-year.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for minutes.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for months.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for nanoseconds.private static final ISOChronology.Unit
Period unit for quarters.private static final ISOChronology.Rule[]
Cache of units for deserialization.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for seconds.(package private) static final int
The number of seconds in one day.private static final long
A serialization identifier for this class.private static final ISOChronology.Unit[]
Cache of units for deserialization.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for week-based-years.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for weeks.private static final ISOChronology.Rule
private static final int
private static final ISOChronology.Unit
Period unit for years. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DateTimeFieldRule<AmPmOfDay>
Gets the rule for the AM/PM of day field.(package private) static void
checkNotNull
(Object object, String errorMessage) Validates that the input value is not null.static DateTimeFieldRule<Integer>
Gets the rule for the clock hour of AM/PM field from 1 to 12.static DateTimeFieldRule<Integer>
Gets the rule for the clock hour of AM/PM field from 1 to 24.static DateTimeFieldRule<Integer>
Gets the rule for the day-of-month field in the ISO chronology.static DateTimeFieldRule<DayOfWeek>
Gets the rule for the day-of-week field.static DateTimeFieldRule<Integer>
Gets the rule for the day-of-year field in the ISO chronology.static CalendricalRule<Long>
Gets the rule for the epoch-days field.(package private) static LocalDate
getDateFromDayOfYear
(int year, int dayOfYear) Calculates the date from a year and day-of-year.(package private) static DayOfWeek
Calculates the day-of-week from a date.(package private) static int
Calculates the day-of-year from a date.getName()
Gets the name of the chronology.(package private) static int
Calculates the week-based-year.(package private) static int
Calculates the week of week-based-year.static DateTimeFieldRule<Integer>
Gets the rule for the hour of AM/PM field from 0 to 11.static DateTimeFieldRule<Integer>
Gets the rule for the hour-of-day field.static boolean
isLeapYear
(int year) Checks if the specified year is a leap year according to the ISO calendar system rules.(package private) void
merge
(CalendricalMerger merger) Merges the set of fields known by this chronology.static DateTimeFieldRule<Integer>
Gets the rule for the milli-of-day field.static DateTimeFieldRule<Integer>
Gets the rule for the milli-of-second field.static DateTimeFieldRule<Integer>
Gets the rule for the minute-of-hour field.static DateTimeFieldRule<Integer>
Gets the rule for the month-of-quarter field in the ISO chronology.static DateTimeFieldRule<MonthOfYear>
Gets the rule for the month-of-year field in the ISO chronology.static CalendricalRule<Long>
Gets the rule for the nano-of-day field.static DateTimeFieldRule<Integer>
Gets the rule for the nano-of-second field.static PeriodUnit
Gets the period unit for twelve hours, as used by AM/PM.static PeriodUnit
Gets the period unit for twenty-four hours, that is often treated as a day.static PeriodUnit
Gets the period unit for centuries of 100 years.static PeriodUnit
Gets the period unit for days.static PeriodUnit
Gets the period unit for decades of 10 years.static PeriodUnit
Gets the period unit for eras.static PeriodUnit
Gets the period unit for hours of 60 minutes.static PeriodUnit
Gets the period unit for microseconds.static PeriodUnit
Gets the period unit for millennia of 1000 years.static PeriodUnit
Gets the period unit for milliseconds.static PeriodUnit
Gets the period unit for minutes of 60 seconds.static PeriodUnit
Gets the period unit for months.static PeriodUnit
Gets the period unit for nanoseconds.static PeriodUnit
Gets the period unit for quarters of 3 months.static PeriodUnit
Gets the period unit for seconds.static PeriodUnit
Gets the period unit for week-based-years.static PeriodUnit
Gets the period unit for weeks of 7 days.static PeriodUnit
Gets the period unit for years of 12 months.static DateTimeFieldRule<QuarterOfYear>
Gets the rule for the quarter-of-year field in the ISO chronology.private Object
Resolves singleton.static DateTimeFieldRule<Integer>
Gets the rule for the second-of-day field.static DateTimeFieldRule<Integer>
Gets the rule for the second-of-minute field.static DateTimeFieldRule<Integer>
Gets the rule for the week-based-year field in the ISO chronology.static DateTimeFieldRule<Integer>
Gets the rule for the week-of-month field in the ISO chronology.static DateTimeFieldRule<Integer>
Gets the rule for the week-of-week-based-year field in the ISO chronology.static DateTimeFieldRule<Integer>
Gets the rule for the week-of-year field in the ISO chronology.static DateTimeFieldRule<Integer>
yearRule()
Gets the rule for the year field in the ISO chronology.Methods inherited from class javax.time.calendar.Chronology
get, rule, toString
-
Field Details
-
INSTANCE
The singleton instance ofISOChronology
. -
MIN_WEEK_BASED_YEAR
public static final int MIN_WEEK_BASED_YEARConstant for the minimum week-based-year.- See Also:
-
MAX_WEEK_BASED_YEAR
public static final int MAX_WEEK_BASED_YEARConstant for the maximum week-based-year.- See Also:
-
serialVersionUID
private static final long serialVersionUIDA serialization identifier for this class.- See Also:
-
SECONDS_PER_DAY
static final int SECONDS_PER_DAYThe number of seconds in one day.- See Also:
-
DAYS_PER_CYCLE
static final int DAYS_PER_CYCLEThe number of days in a 400 year cycle.- See Also:
-
DAYS_0000_TO_1970
static final long DAYS_0000_TO_1970The number of days from year zero to year 1970. There are five 400 year cycles from year zero to 2000. There are 7 leap years from 1970 to 2000.- See Also:
-
DAYS_0000_TO_MJD_EPOCH
static final long DAYS_0000_TO_MJD_EPOCHThe number of days from year zero to the Modified Julian Day epoch of 1858-11-17.- See Also:
-
NANOS
Period unit for nanoseconds. -
MICROS
Period unit for microseconds. -
MILLIS
Period unit for milliseconds. -
SECONDS
Period unit for seconds. -
MINUTES
Period unit for minutes. -
HOURS
Period unit for hours. -
_12_HOURS
Period unit for 12 hours half-days, used by AM/PM. -
_24_HOURS
Period unit for 24 hour fixed length days. -
DAYS
Period unit for days. -
WEEKS
Period unit for weeks. -
MONTHS
Period unit for months. -
QUARTERS
Period unit for quarters. -
WEEK_BASED_YEARS
Period unit for week-based-years. -
YEARS
Period unit for years. -
DECADES
Period unit for decades. -
CENTURIES
Period unit for centuries. -
MILLENNIA
Period unit for millennia. -
ERAS
Period unit for eras. -
UNIT_CACHE
Cache of units for deserialization. Indices must match ordinal passed to unit constructor. -
NANO_OF_SECOND_ORDINAL
private static final int NANO_OF_SECOND_ORDINAL- See Also:
-
MILLI_OF_SECOND_ORDINAL
private static final int MILLI_OF_SECOND_ORDINAL- See Also:
-
MILLI_OF_DAY_ORDINAL
private static final int MILLI_OF_DAY_ORDINAL- See Also:
-
SECOND_OF_MINUTE_ORDINAL
private static final int SECOND_OF_MINUTE_ORDINAL- See Also:
-
SECOND_OF_DAY_ORDINAL
private static final int SECOND_OF_DAY_ORDINAL- See Also:
-
MINUTE_OF_HOUR_ORDINAL
private static final int MINUTE_OF_HOUR_ORDINAL- See Also:
-
CLOCK_HOUR_OF_AMPM_ORDINAL
private static final int CLOCK_HOUR_OF_AMPM_ORDINAL- See Also:
-
HOUR_OF_AMPM_ORDINAL
private static final int HOUR_OF_AMPM_ORDINAL- See Also:
-
CLOCK_HOUR_OF_DAY_ORDINAL
private static final int CLOCK_HOUR_OF_DAY_ORDINAL- See Also:
-
HOUR_OF_DAY_ORDINAL
private static final int HOUR_OF_DAY_ORDINAL- See Also:
-
DAY_OF_MONTH_ORDINAL
private static final int DAY_OF_MONTH_ORDINAL- See Also:
-
DAY_OF_YEAR_ORDINAL
private static final int DAY_OF_YEAR_ORDINAL- See Also:
-
WEEK_OF_MONTH_ORDINAL
private static final int WEEK_OF_MONTH_ORDINAL- See Also:
-
WEEK_OF_WEEK_BASED_YEAR_ORDINAL
private static final int WEEK_OF_WEEK_BASED_YEAR_ORDINAL- See Also:
-
WEEK_OF_YEAR_ORDINAL
private static final int WEEK_OF_YEAR_ORDINAL- See Also:
-
MONTH_OF_QUARTER_ORDINAL
private static final int MONTH_OF_QUARTER_ORDINAL- See Also:
-
WEEK_BASED_YEAR_ORDINAL
private static final int WEEK_BASED_YEAR_ORDINAL- See Also:
-
YEAR_ORDINAL
private static final int YEAR_ORDINAL- See Also:
-
NANO_OF_SECOND
-
MILLI_OF_SECOND
-
MILLI_OF_DAY
-
SECOND_OF_MINUTE
-
SECOND_OF_DAY
-
MINUTE_OF_HOUR
-
CLOCK_HOUR_OF_AMPM
-
HOUR_OF_AMPM
-
CLOCK_HOUR_OF_DAY
-
HOUR_OF_DAY
-
DAY_OF_MONTH
-
DAY_OF_YEAR
-
WEEK_OF_MONTH
-
WEEK_OF_WEEK_BASED_YEAR
-
WEEK_OF_YEAR
-
MONTH_OF_QUARTER
-
WEEK_BASED_YEAR
-
YEAR
-
RULE_CACHE
Cache of units for deserialization. Indices must match ordinal passed to rule constructor.
-
-
Constructor Details
-
ISOChronology
private ISOChronology()Restrictive constructor.
-
-
Method Details
-
isLeapYear
public static boolean isLeapYear(int year) Checks if the specified year is a leap year according to the ISO calendar system rules.The ISO calendar system applies the current rules for leap years across the whole time-line. In general, a year is a leap year if it is divisible by four without remainder. However, years divisible by 100, are not leap years, with the exception of years divisible by 400 which are.
For example, 1904 is a leap year it is divisible by 4. 1900 was not a leap year as it is divisible by 100, however 2000 was a leap year as it is divisible by 400.
The calculation is proleptic - applying the same rules into the far future and far past. This is historically inaccurate, but is correct for the ISO8601 standard.
- Parameters:
year
- the year to check, not validated for range- Returns:
- true if the year is a leap year
-
checkNotNull
Validates that the input value is not null.- Parameters:
object
- the object to checkerrorMessage
- the error to throw- Throws:
NullPointerException
- if the object is null
-
getDayOfWeekFromDate
Calculates the day-of-week from a date.- Parameters:
date
- the date to use, not null- Returns:
- the day-of-week
-
getDayOfYearFromDate
Calculates the day-of-year from a date.- Parameters:
date
- the date to use, not null- Returns:
- the day-of-year
-
getDateFromDayOfYear
Calculates the date from a year and day-of-year.- Parameters:
year
- the year, validdayOfYear
- the day-of-year, valid- Returns:
- the date, never null
-
getWeekBasedYearFromDate
Calculates the week-based-year.- Parameters:
date
- the date, not null- Returns:
- the week-based-year
-
getWeekOfWeekBasedYearFromDate
Calculates the week of week-based-year.- Parameters:
date
- the date to use, not null- Returns:
- the week
-
readResolve
Resolves singleton.- Returns:
- the singleton instance
-
getName
Gets the name of the chronology.- Specified by:
getName
in classChronology
- Returns:
- the name of the chronology, never null
-
yearRule
Gets the rule for the year field in the ISO chronology.This field counts years using the modern civil calendar system as defined by ISO-8601. There is no historical cutover (as found in historical dates such as from the Julian to Gregorian calendar).
The implication of this is that historical dates will not be accurate. All work requiring accurate historical dates must use the appropriate chronology that defines the Gregorian cutover.
A further implication of the ISO-8601 rules is that the year zero exists. This roughly equates to 1 BC/BCE, however the alignment is not exact as explained above.
- Returns:
- the rule for the year field, never null
-
monthOfYearRule
Gets the rule for the month-of-year field in the ISO chronology.This field counts months sequentially from the start of the year. The values follow the ISO-8601 standard and normal human interactions. These define January as value 1 to December as value 12.
The enum
MonthOfYear
should be used wherever possible in applications when referring to the day of the week to avoid hard-coding the values.- Returns:
- the rule for the month-of-year field, never null
-
dayOfMonthRule
Gets the rule for the day-of-month field in the ISO chronology.This field counts days sequentially from the start of the month. The first day of the month is 1 and the last is 28, 29, 30 or 31 depending on the month and whether it is a leap year.
- Returns:
- the rule for the day-of-month field, never null
-
dayOfYearRule
Gets the rule for the day-of-year field in the ISO chronology.This field counts days sequentially from the start of the year. The first day of the year is 1 and the last is 365, or 366 in a leap year.
- Returns:
- the rule for the day-of-year field, never null
-
weekBasedYearRule
Gets the rule for the week-based-year field in the ISO chronology.This field is the year that results from calculating weeks with the ISO-8601 algorithm. See
week of week-based-year
for details.The week-based-year will either be 52 or 53 weeks long, depending on the result of the algorithm for a particular date.
- Returns:
- the rule for the week-based-year field, never null
-
weekOfWeekBasedYearRule
Gets the rule for the week-of-week-based-year field in the ISO chronology.This field counts weeks using the ISO-8601 algorithm. The first week of the year is the week which has at least 4 days in the year using a Monday to Sunday week definition. Thus it is possible for the first week to start on any day from the 29th December in the previous year to the 4th January in the new year. The year which is aligned with this field is known as the
week-based-year
.- Returns:
- the rule for the week-of-week-based-year field, never null
-
dayOfWeekRule
Gets the rule for the day-of-week field.This field uses the ISO-8601 values for the day-of-week. These define Monday as value 1 to Sunday as value 7.
The enum
DayOfWeek
should be used wherever possible in applications when referring to the day of the week value to avoid needing to remember the values from 1 to 7.- Returns:
- the rule for the day-of-week field, never null
-
weekOfYearRule
Gets the rule for the week-of-year field in the ISO chronology.This field counts weeks in groups of seven days starting from the first of January. The 1st to the 7th of January is always week 1 while the 8th to the 14th is always week 2.
- Returns:
- the rule for the week-of-year field, never null
-
quarterOfYearRule
Gets the rule for the quarter-of-year field in the ISO chronology.This field counts quarters sequentially from the start of the year. The first quarter of the year is 1 and the last is 4. Each quarter lasts exactly three months.
- Returns:
- the rule for the quarter-of-year field, never null
-
monthOfQuarterRule
Gets the rule for the month-of-quarter field in the ISO chronology.This field counts months sequentially from the start of the quarter. The first month of the quarter is 1 and the last is 3. Each quarter lasts exactly three months.
- Returns:
- the rule for the month-of-quarter field, never null
-
weekOfMonthRule
Gets the rule for the week-of-month field in the ISO chronology.This field counts weeks in groups of seven days starting from the first day of the month. The 1st to the 7th of a month is always week 1 while the 8th to the 14th is always week 2 and so on.
This field can be used to create concepts such as 'the second Saturday' of a month. To achieve this, setup a
DateTimeFields
instance using this rule and theday-of-week
rule.- Returns:
- the rule for the week-of-month field, never null
-
hourOfDayRule
Gets the rule for the hour-of-day field.This field counts hours sequentially from the start of the day. The values run from 0 to 23.
- Returns:
- the rule for the hour-of-day field, never null
-
minuteOfHourRule
Gets the rule for the minute-of-hour field.This field counts minutes sequentially from the start of the hour. The values run from 0 to 59.
- Returns:
- the rule for the minute-of-hour field, never null
-
secondOfMinuteRule
Gets the rule for the second-of-minute field.This field counts seconds sequentially from the start of the minute. The values run from 0 to 59.
- Returns:
- the rule for the second-of-minute field, never null
-
nanoOfSecondRule
Gets the rule for the nano-of-second field.This field counts nanoseconds sequentially from the start of the second. The values run from 0 to 999,999,999.
- Returns:
- the rule for the nano-of-second field, never null
-
secondOfDayRule
Gets the rule for the second-of-day field.This field counts seconds sequentially from the start of the day. The values run from 0 to 86399.
- Returns:
- the rule for the second-of-day field, never null
-
milliOfDayRule
Gets the rule for the milli-of-day field.This field counts milliseconds sequentially from the start of the day. The values run from 0 to 86,399,999.
- Returns:
- the rule for the milli-of-day field, never null
-
milliOfSecondRule
Gets the rule for the milli-of-second field.This field counts milliseconds sequentially from the start of the second. The values run from 0 to 999.
- Returns:
- the rule for the milli-of-second field, never null
-
amPmOfDayRule
Gets the rule for the AM/PM of day field.This field defines the half-day AM/PM value. The hour-of-day from 0 to 11 is defined as AM, while the hours from 12 to 23 are defined as PM. AM is defined with the value 0, while PM is defined with the value 1.
The enum
AmPmOfDay
should be used wherever possible in applications when referring to the day of the week to avoid hard-coding the values.- Returns:
- the rule for the am/pm of day field, never null
-
hourOfAmPmRule
Gets the rule for the hour of AM/PM field from 0 to 11.This field counts hours sequentially from the start of the half-day AM/PM. The values run from 0 to 11.
- Returns:
- the rule for the hour of AM/PM field, never null
-
clockHourOfAmPmRule
Gets the rule for the clock hour of AM/PM field from 1 to 12.This field counts hours sequentially within the half-day AM/PM as normally seen on a clock or watch. The values run from 1 to 12.
- Returns:
- the rule for the hour of AM/PM field, never null
-
clockHourOfDayRule
Gets the rule for the clock hour of AM/PM field from 1 to 24.This field counts hours sequentially within the day starting from 1. The values run from 1 to 24.
- Returns:
- the rule for the clock-hour-of-day field, never null
-
epochDays
Gets the rule for the epoch-days field.This field counts seconds sequentially from the Java epoch of 1970-01-01.
- Returns:
- the rule for the epoch-days field, never null
-
nanoOfDayRule
Gets the rule for the nano-of-day field.This field counts seconds sequentially from the start of the day. The values run from 0 to 86,399,999,999,999.
- Returns:
- the rule for the nano-of-day field, never null
-
periodEras
Gets the period unit for eras.The period unit defines the concept of a period of a eras. An era, based on a simple before/after point on the time-line, is infinite in length. For this rule, an era has an estimated duration of 2,000,000,000 years.
This is a basic unit and has no equivalent period. The estimated duration is equal to 2,000,000,000 years.
- Returns:
- the period unit for eras, never null
-
periodMillennia
Gets the period unit for millennia of 1000 years.The period unit defines the concept of a period of a century.
The equivalent period and estimated duration are equal to 10 centuries.
- Returns:
- the period unit for millennia, never null
-
periodCenturies
Gets the period unit for centuries of 100 years.The period unit defines the concept of a period of a century.
The equivalent period and estimated duration are equal to 10 decades.
- Returns:
- the period unit for centuries, never null
-
periodDecades
Gets the period unit for decades of 10 years.The period unit defines the concept of a period of a decade.
The equivalent period and estimated duration are equal to 10 years.
- Returns:
- the period unit for decades, never null
-
periodYears
Gets the period unit for years of 12 months.The period unit defines the concept of a period of a year.
The equivalent period and estimated duration are equal to 4 quarters.
See
yearRule()
for the main date-time field.- Returns:
- the period unit for years, never null
-
periodWeekBasedYears
Gets the period unit for week-based-years.The period unit defines the concept of a period of a week-based-year. This is typically 52 weeks, and occasionally 53 weeks.
This is a basic unit and has no equivalent period. The estimated duration is equal to 364.5 days, which is just over 5 weeks.
See
weekBasedYearRule()
for the main date-time field.- Returns:
- the period unit for week-based-years, never null
-
periodQuarters
Gets the period unit for quarters of 3 months.The period unit defines the concept of a period of a quarter.
The equivalent period and estimated duration are equal to 3 months.
See
quarterOfYearRule()
for the main date-time field.- Returns:
- the period unit for quarters, never null
-
periodMonths
Gets the period unit for months.The period unit defines the concept of a period of a month.
This is a basic unit and has no equivalent period. The estimated duration is equal to one-twelfth of a year based on 365.2425 days.
See
monthOfYearRule()
for the main date-time field.- Returns:
- the period unit for months, never null
-
periodWeeks
Gets the period unit for weeks of 7 days.The period unit defines the concept of a period of a week.
The equivalent period and estimated duration are equal to 7 days.
See
weekOfWeekBasedYearRule()
andweekOfYearRule()
for the main date-time fields.- Returns:
- the period unit for weeks, never null
-
periodDays
Gets the period unit for days.The period unit defines the concept of a period of a day. This is typically equal to 24 hours, but may vary due to time-zone changes.
This chronology defines two units that could represent a day. This unit,
Days
, represents a day that varies in length based on time-zone (daylight savings time) changes. It is a basic unit that cannot be converted to seconds, nanoseconds orDuration
. By contrast, the24Hours
unit has a fixed length of exactly 24 hours allowing it to be converted to seconds, nanoseconds andDuration
.This is a basic unit and has no equivalent period. The estimated duration is equal to 24 hours.
See
dayOfMonthRule()
for the main date-time field.- Returns:
- the period unit for accurate, variable length, days, never null
-
period24Hours
Gets the period unit for twenty-four hours, that is often treated as a day.The period unit defines the concept of a period of exactly 24 hours that is often treated as a day. The unit name of "24Hours" is intended to convey the fact that this is primarily a 24 hour unit that happens to be used as a day unit on occasion. In most scenarios, the standard
Days
unit is more applicable and accurate.This chronology defines two units that could represent a day. This unit,
24Hours
, represents a fixed length of exactly 24 hours, allowing it to be converted to seconds, nanoseconds andDuration
. By contrast, theDays
unit varies in length based on time-zone (daylight savings time) changes and cannot be converted to seconds, nanoseconds orDuration
.The equivalent period and estimated duration are equal to twice the 12 hours unit, making it also equivalent to 24 hours.
- Returns:
- the period unit for fixed, 24 hour, days, never null
-
period12Hours
Gets the period unit for twelve hours, as used by AM/PM.The period unit defines the concept of a period of 12 hours.
The equivalent period and estimated duration are equal to 12 hours.
See
amPmOfDayRule()
for the main date-time field.- Returns:
- the period unit for twelve hours, never null
-
periodHours
Gets the period unit for hours of 60 minutes.The period unit defines the concept of a period of a hour.
The equivalent period and estimated duration are equal to 60 minutes.
See
hourOfDayRule()
for the main date-time field.- Returns:
- the period unit for hours, never null
-
periodMinutes
Gets the period unit for minutes of 60 seconds.The period unit defines the concept of a period of a minute.
The equivalent period and estimated duration are equal to 60 seconds.
See
minuteOfHourRule()
for the main date-time field.- Returns:
- the period unit for minutes, never null
-
periodSeconds
Gets the period unit for seconds.The period unit defines the concept of a period of a second.
The equivalent period and estimated duration are equal to 1000 milliseconds.
See
secondOfMinuteRule()
for the main date-time field.- Returns:
- the period unit for seconds, never null
-
periodMillis
Gets the period unit for milliseconds.The period unit defines the concept of a period of a millisecond.
The equivalent period and estimated duration are equal to 1000 microseconds.
See
milliOfSecondRule()
for the main date-time field.- Returns:
- the period unit for milliseconds, never null
-
periodMicros
Gets the period unit for microseconds.The period unit defines the concept of a period of a microsecond.
The equivalent period and estimated duration are equal to 1000 nanoseconds.
- Returns:
- the period unit for microseconds, never null
-
periodNanos
Gets the period unit for nanoseconds.The period unit defines the concept of a period of a nanosecond.
This is a basic unit and has no equivalent period. The estimated duration is 1 nanosecond.
See
nanoOfSecondRule()
for the main date-time field.- Returns:
- the period unit for nanoseconds, never null
-
merge
Merges the set of fields known by this chronology.- Parameters:
merger
- the merger to use, not null
-