Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.joda.time.Chronology
org.joda.time.chrono.BaseChronology
Constructor Summary | |
|
Method Summary | |
long |
|
long |
|
DurationField |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DurationField |
|
DateTimeField |
|
DurationField |
|
int[] |
|
int[] |
|
int[] |
|
long |
|
long |
|
long |
|
abstract DateTimeZone |
|
DateTimeField |
|
DurationField |
|
DateTimeField |
|
DateTimeField |
|
DurationField |
|
DurationField |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DurationField |
|
DateTimeField |
|
DurationField |
|
DateTimeField |
|
DateTimeField |
|
DurationField |
|
long |
|
abstract String |
|
void |
|
DateTimeField |
|
DurationField |
|
DateTimeField |
|
DateTimeField |
|
DurationField |
|
abstract Chronology |
|
abstract Chronology |
|
DateTimeField |
|
DateTimeField |
|
DateTimeField |
|
DurationField |
|
Methods inherited from class org.joda.time.Chronology | |
add , add , centuries , centuryOfEra , clockhourOfDay , clockhourOfHalfday , dayOfMonth , dayOfWeek , dayOfYear , days , era , eras , get , get , get , getBuddhist , getBuddhist , getBuddhistUTC , getCoptic , getCoptic , getCopticUTC , getDateTimeMillis , getDateTimeMillis , getDateTimeMillis , getGJ , getGJ , getGJUTC , getGregorian , getGregorian , getGregorianUTC , getISO , getISO , getISOUTC , getJulian , getJulian , getJulianUTC , getZone , halfdayOfDay , halfdays , hourOfDay , hourOfHalfday , hours , millis , millisOfDay , millisOfSecond , minuteOfDay , minuteOfHour , minutes , monthOfYear , months , secondOfDay , secondOfMinute , seconds , set , toString , validate , weekOfWeekyear , weeks , weekyear , weekyearOfCentury , weekyears , withUTC , withZone , year , yearOfCentury , yearOfEra , years |
public long add(long instant, long duration, int scalar)
Adds the duration to the instant, specifying the number of times to add.
- Overrides:
- add in interface Chronology
- Parameters:
instant
- the instant to add toduration
- the duration to addscalar
- the number of times to add
- Returns:
- the updated instant
public long add(ReadablePeriod period, long instant, int scalar)
Adds the period to the instant, specifying the number of times to add.
- Overrides:
- add in interface Chronology
- Parameters:
period
- the period to add, null means add nothinginstant
- the instant to add toscalar
- the number of times to add
- Returns:
- the updated instant
public DurationField centuries()
Get the centuries duration field for this chronology.
- Overrides:
- centuries in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField centuryOfEra()
Get the century of era field for this chronology.
- Overrides:
- centuryOfEra in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField clockhourOfDay()
Get the hour of day (offset to 1-24) field for this chronology.
- Overrides:
- clockhourOfDay in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField clockhourOfHalfday()
Get the hour of am/pm (offset to 1-12) field for this chronology.
- Overrides:
- clockhourOfHalfday in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField dayOfMonth()
Get the day of month field for this chronology.
- Overrides:
- dayOfMonth in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField dayOfWeek()
Get the day of week field for this chronology. DayOfWeek values are defined inDateTimeConstants
. They use the ISO definitions, where 1 is Monday and 7 is Sunday.
- Overrides:
- dayOfWeek in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField dayOfYear()
Get the day of year field for this chronology.
- Overrides:
- dayOfYear in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField days()
Get the days duration field for this chronology.
- Overrides:
- days in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField era()
Get the era field for this chronology.
- Overrides:
- era in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField eras()
Get the eras duration field for this chronology.
- Overrides:
- eras in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public int[] get(ReadablePartial partial, long instant)
Gets the values of a partial from an instant.
- Overrides:
- get in interface Chronology
- Parameters:
partial
- the partial instant to useinstant
- the instant to query
- Returns:
- the values of the partial extracted from the instant
public int[] get(ReadablePeriod period, long duration)
Gets the values of a period from an interval.
- Overrides:
- get in interface Chronology
- Parameters:
period
- the period instant to useduration
- the duration to query
- Returns:
- the values of the period extracted from the duration
public int[] get(ReadablePeriod period, long startInstant, long endInstant)
Gets the values of a period from an interval.
- Overrides:
- get in interface Chronology
- Parameters:
period
- the period instant to usestartInstant
- the start instant of an interval to queryendInstant
- the start instant of an interval to query
- Returns:
- the values of the period extracted from the interval
public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay) throws IllegalArgumentException
Returns a datetime millisecond instant, formed from the given year, month, day, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown. The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
- Overrides:
- getDateTimeMillis in interface Chronology
- Parameters:
year
- year to usemonthOfYear
- month to usedayOfMonth
- day of month to usemillisOfDay
- millisecond to use
- Returns:
- millisecond instant from 1970-01-01T00:00:00Z
public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException
Returns a datetime millisecond instant, formed from the given year, month, day, hour, minute, second, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown. The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
- Overrides:
- getDateTimeMillis in interface Chronology
- Parameters:
year
- year to usemonthOfYear
- month to usedayOfMonth
- day of month to usehourOfDay
- hour to useminuteOfHour
- minute to usesecondOfMinute
- second to usemillisOfSecond
- millisecond to use
- Returns:
- millisecond instant from 1970-01-01T00:00:00Z
public long getDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException
Returns a datetime millisecond instant, from from the given instant, hour, minute, second, and millisecond values. The set of given values must refer to a valid datetime, or else an IllegalArgumentException is thrown. The default implementation calls upon separate DateTimeFields to determine the result. Subclasses are encouraged to provide a more efficient implementation.
- Overrides:
- getDateTimeMillis in interface Chronology
- Parameters:
instant
- instant to start fromhourOfDay
- hour to useminuteOfHour
- minute to usesecondOfMinute
- second to usemillisOfSecond
- millisecond to use
- Returns:
- millisecond instant from 1970-01-01T00:00:00Z
public abstract DateTimeZone getZone()
Returns the DateTimeZone that this Chronology operates in, or null if unspecified.
- Overrides:
- getZone in interface Chronology
- Returns:
- DateTimeZone null if unspecified
public DateTimeField halfdayOfDay()
Get the AM(0) PM(1) field for this chronology.
- Overrides:
- halfdayOfDay in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField halfdays()
Get the halfdays duration field for this chronology.
- Overrides:
- halfdays in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField hourOfDay()
Get the hour of day (0-23) field for this chronology.
- Overrides:
- hourOfDay in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField hourOfHalfday()
Get the hour of am/pm (0-11) field for this chronology.
- Overrides:
- hourOfHalfday in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField hours()
Get the hours duration field for this chronology.
- Overrides:
- hours in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DurationField millis()
Get the millis duration field for this chronology.
- Overrides:
- millis in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField millisOfDay()
Get the millis of day field for this chronology.
- Overrides:
- millisOfDay in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField millisOfSecond()
Get the millis of second field for this chronology.
- Overrides:
- millisOfSecond in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField minuteOfDay()
Get the minute of day field for this chronology.
- Overrides:
- minuteOfDay in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField minuteOfHour()
Get the minute of hour field for this chronology.
- Overrides:
- minuteOfHour in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField minutes()
Get the minutes duration field for this chronology.
- Overrides:
- minutes in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField monthOfYear()
Get the month of year field for this chronology.
- Overrides:
- monthOfYear in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField months()
Get the months duration field for this chronology.
- Overrides:
- months in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField secondOfDay()
Get the second of day field for this chronology.
- Overrides:
- secondOfDay in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField secondOfMinute()
Get the second of minute field for this chronology.
- Overrides:
- secondOfMinute in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField seconds()
Get the seconds duration field for this chronology.
- Overrides:
- seconds in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public long set(ReadablePartial partial, long instant)
Sets the partial into the instant.
- Overrides:
- set in interface Chronology
- Parameters:
partial
- the partial instant to useinstant
- the instant to update
- Returns:
- the updated instant
public abstract String toString()
Gets a debugging toString.
- Overrides:
- toString in interface Chronology
- Returns:
- a debugging string
public void validate(ReadablePartial partial, int[] values)
Validates whether the fields stored in a partial instant are valid. This implementation usesDateTimeField.getMinimumValue(ReadablePartial,int[])
andDateTimeField.getMaximumValue(ReadablePartial,int[])
.
- Overrides:
- validate in interface Chronology
- Parameters:
partial
- the partial instant to validatevalues
- the values to validate, not null
public DateTimeField weekOfWeekyear()
Get the week of a week based year field for this chronology.
- Overrides:
- weekOfWeekyear in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField weeks()
Get the weeks duration field for this chronology.
- Overrides:
- weeks in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public DateTimeField weekyear()
Get the year of a week based year field for this chronology.
- Overrides:
- weekyear in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField weekyearOfCentury()
Get the year of a week based year in a century field for this chronology.
- Overrides:
- weekyearOfCentury in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField weekyears()
Get the weekyears duration field for this chronology.
- Overrides:
- weekyears in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported
public abstract Chronology withUTC()
Returns an instance of this Chronology that operates in the UTC time zone. Chronologies that do not operate in a time zone or are already UTC must return themself.
- Overrides:
- withUTC in interface Chronology
- Returns:
- a version of this chronology that ignores time zones
public abstract Chronology withZone(DateTimeZone zone)
Returns an instance of this Chronology that operates in any time zone.
- Overrides:
- withZone in interface Chronology
- Parameters:
zone
- to use, or default if null
- Returns:
- a version of this chronology with a specific time zone
- See Also:
ZonedChronology
public DateTimeField year()
Get the year field for this chronology.
- Overrides:
- year in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField yearOfCentury()
Get the year of century field for this chronology.
- Overrides:
- yearOfCentury in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DateTimeField yearOfEra()
Get the year of era field for this chronology.
- Overrides:
- yearOfEra in interface Chronology
- Returns:
- DateTimeField or UnsupportedDateTimeField if unsupported
public DurationField years()
Get the years duration field for this chronology.
- Overrides:
- years in interface Chronology
- Returns:
- DurationField or UnsupportedDurationField if unsupported