| java.lang.Object org.joda.time.Chronology org.joda.time.chrono.BaseChronology
All known Subclasses: org.joda.time.convert.MockBadChronology, org.joda.time.chrono.AssembledChronology, org.joda.time.MockNullZoneChronology, org.joda.time.chrono.gj.TestGJChronology,
BaseChronology | abstract public class BaseChronology extends Chronology implements Serializable(Code) | | BaseChronology provides a skeleton implementation for chronology
classes. Many utility methods are defined, but all fields are unsupported.
BaseChronology is thread-safe and immutable, and all subclasses must be
as well.
author: Brian S O'Neill since: 1.0 |
Constructor Summary | |
protected | BaseChronology() Restricted constructor. |
Method Summary | |
public long | add(ReadablePeriod period, long instant, int scalar) Adds the period to the instant, specifying the number of times to add. | public long | add(long instant, long duration, int scalar) Adds the duration to the instant, specifying the number of times to add. | public DurationField | centuries() Get the centuries duration field for this chronology. | public DateTimeField | centuryOfEra() Get the century of era field for this chronology. | public DateTimeField | clockhourOfDay() Get the hour of day (offset to 1-24) field for this chronology. | public DateTimeField | clockhourOfHalfday() Get the hour of am/pm (offset to 1-12) field for this chronology. | public DateTimeField | dayOfMonth() Get the day of month field for this chronology. | public DateTimeField | dayOfWeek() Get the day of week field for this chronology. | public DateTimeField | dayOfYear() Get the day of year field for this chronology. | public DurationField | days() Get the days duration field for this chronology. | public DateTimeField | era() Get the era field for this chronology. | public DurationField | eras() Get the eras duration field for this chronology. | public int[] | get(ReadablePartial partial, long instant) Gets the values of a partial from an instant. | public int[] | get(ReadablePeriod period, long startInstant, long endInstant) Gets the values of a period from an interval. | public int[] | get(ReadablePeriod period, long duration) Gets the values of a period from an interval. | public long | getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay) Returns a datetime millisecond instant, formed from the given year,
month, day, and millisecond values. | public long | getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) Returns a datetime millisecond instant, formed from the given year,
month, day, hour, minute, second, and millisecond values. | public long | getDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) Returns a datetime millisecond instant, from from the given instant,
hour, minute, second, and millisecond values. | abstract public DateTimeZone | getZone() Returns the DateTimeZone that this Chronology operates in, or null if
unspecified. | public DateTimeField | halfdayOfDay() Get the AM(0) PM(1) field for this chronology. | public DurationField | halfdays() Get the halfdays duration field for this chronology. | public DateTimeField | hourOfDay() Get the hour of day (0-23) field for this chronology. | public DateTimeField | hourOfHalfday() Get the hour of am/pm (0-11) field for this chronology. | public DurationField | hours() Get the hours duration field for this chronology. | public DurationField | millis() Get the millis duration field for this chronology. | public DateTimeField | millisOfDay() Get the millis of day field for this chronology. | public DateTimeField | millisOfSecond() Get the millis of second field for this chronology. | public DateTimeField | minuteOfDay() Get the minute of day field for this chronology. | public DateTimeField | minuteOfHour() Get the minute of hour field for this chronology. | public DurationField | minutes() Get the minutes duration field for this chronology. | public DateTimeField | monthOfYear() Get the month of year field for this chronology. | public DurationField | months() Get the months duration field for this chronology. | public DateTimeField | secondOfDay() Get the second of day field for this chronology. | public DateTimeField | secondOfMinute() Get the second of minute field for this chronology. | public DurationField | seconds() Get the seconds duration field for this chronology. | public long | set(ReadablePartial partial, long instant) Sets the partial into the instant. | abstract public String | toString() Gets a debugging toString. | public void | validate(ReadablePartial partial, int[] values) Validates whether the fields stored in a partial instant are valid. | public DateTimeField | weekOfWeekyear() Get the week of a week based year field for this chronology. | public DurationField | weeks() Get the weeks duration field for this chronology. | public DateTimeField | weekyear() Get the year of a week based year field for this chronology. | public DateTimeField | weekyearOfCentury() Get the year of a week based year in a century field for this chronology. | public DurationField | weekyears() Get the weekyears duration field for this chronology. | abstract public Chronology | withUTC() Returns an instance of this Chronology that operates in the UTC time
zone. | abstract public Chronology | withZone(DateTimeZone zone) Returns an instance of this Chronology that operates in any time zone. | public DateTimeField | year() Get the year field for this chronology. | public DateTimeField | yearOfCentury() Get the year of century field for this chronology. | public DateTimeField | yearOfEra() Get the year of era field for this chronology. | public DurationField | years() Get the years duration field for this chronology. |
BaseChronology | protected BaseChronology()(Code) | | Restricted constructor.
|
add | public long add(ReadablePeriod period, long instant, int scalar)(Code) | | Adds the period to the instant, specifying the number of times to add.
Parameters: period - the period to add, null means add nothing Parameters: instant - the instant to add to Parameters: scalar - the number of times to add the updated instant |
add | public long add(long instant, long duration, int scalar)(Code) | | Adds the duration to the instant, specifying the number of times to add.
Parameters: instant - the instant to add to Parameters: duration - the duration to add Parameters: scalar - the number of times to add the updated instant |
centuries | public DurationField centuries()(Code) | | Get the centuries duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
centuryOfEra | public DateTimeField centuryOfEra()(Code) | | Get the century of era field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
clockhourOfDay | public DateTimeField clockhourOfDay()(Code) | | Get the hour of day (offset to 1-24) field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
clockhourOfHalfday | public DateTimeField clockhourOfHalfday()(Code) | | Get the hour of am/pm (offset to 1-12) field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
dayOfMonth | public DateTimeField dayOfMonth()(Code) | | Get the day of month field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
dayOfWeek | public DateTimeField dayOfWeek()(Code) | | Get the day of week field for this chronology.
DayOfWeek values are defined in
org.joda.time.DateTimeConstants DateTimeConstants .
They use the ISO definitions, where 1 is Monday and 7 is Sunday.
DateTimeField or UnsupportedDateTimeField if unsupported |
dayOfYear | public DateTimeField dayOfYear()(Code) | | Get the day of year field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
days | public DurationField days()(Code) | | Get the days duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
era | public DateTimeField era()(Code) | | Get the era field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
eras | public DurationField eras()(Code) | | Get the eras duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
get | public int[] get(ReadablePartial partial, long instant)(Code) | | Gets the values of a partial from an instant.
Parameters: partial - the partial instant to use Parameters: instant - the instant to query the values of the partial extracted from the instant |
get | public int[] get(ReadablePeriod period, long startInstant, long endInstant)(Code) | | Gets the values of a period from an interval.
Parameters: period - the period instant to use Parameters: startInstant - the start instant of an interval to query Parameters: endInstant - the start instant of an interval to query the values of the period extracted from the interval |
get | public int[] get(ReadablePeriod period, long duration)(Code) | | Gets the values of a period from an interval.
Parameters: period - the period instant to use Parameters: duration - the duration to query the values of the period extracted from the duration |
getDateTimeMillis | public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay) throws IllegalArgumentException(Code) | | 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.
Parameters: year - year to use Parameters: monthOfYear - month to use Parameters: dayOfMonth - day of month to use Parameters: millisOfDay - millisecond to use millisecond instant from 1970-01-01T00:00:00Z |
getDateTimeMillis | public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException(Code) | | 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.
Parameters: year - year to use Parameters: monthOfYear - month to use Parameters: dayOfMonth - day of month to use Parameters: hourOfDay - hour to use Parameters: minuteOfHour - minute to use Parameters: secondOfMinute - second to use Parameters: millisOfSecond - millisecond to use millisecond instant from 1970-01-01T00:00:00Z |
getDateTimeMillis | public long getDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) throws IllegalArgumentException(Code) | | 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.
Parameters: instant - instant to start from Parameters: hourOfDay - hour to use Parameters: minuteOfHour - minute to use Parameters: secondOfMinute - second to use Parameters: millisOfSecond - millisecond to use millisecond instant from 1970-01-01T00:00:00Z |
getZone | abstract public DateTimeZone getZone()(Code) | | Returns the DateTimeZone that this Chronology operates in, or null if
unspecified.
DateTimeZone null if unspecified |
halfdayOfDay | public DateTimeField halfdayOfDay()(Code) | | Get the AM(0) PM(1) field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
halfdays | public DurationField halfdays()(Code) | | Get the halfdays duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
hourOfDay | public DateTimeField hourOfDay()(Code) | | Get the hour of day (0-23) field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
hourOfHalfday | public DateTimeField hourOfHalfday()(Code) | | Get the hour of am/pm (0-11) field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
hours | public DurationField hours()(Code) | | Get the hours duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
millis | public DurationField millis()(Code) | | Get the millis duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
millisOfDay | public DateTimeField millisOfDay()(Code) | | Get the millis of day field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
millisOfSecond | public DateTimeField millisOfSecond()(Code) | | Get the millis of second field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
minuteOfDay | public DateTimeField minuteOfDay()(Code) | | Get the minute of day field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
minuteOfHour | public DateTimeField minuteOfHour()(Code) | | Get the minute of hour field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
minutes | public DurationField minutes()(Code) | | Get the minutes duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
monthOfYear | public DateTimeField monthOfYear()(Code) | | Get the month of year field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
months | public DurationField months()(Code) | | Get the months duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
secondOfDay | public DateTimeField secondOfDay()(Code) | | Get the second of day field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
secondOfMinute | public DateTimeField secondOfMinute()(Code) | | Get the second of minute field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
seconds | public DurationField seconds()(Code) | | Get the seconds duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
set | public long set(ReadablePartial partial, long instant)(Code) | | Sets the partial into the instant.
Parameters: partial - the partial instant to use Parameters: instant - the instant to update the updated instant |
toString | abstract public String toString()(Code) | | Gets a debugging toString.
a debugging string |
weekOfWeekyear | public DateTimeField weekOfWeekyear()(Code) | | Get the week of a week based year field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
weeks | public DurationField weeks()(Code) | | Get the weeks duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
weekyear | public DateTimeField weekyear()(Code) | | Get the year of a week based year field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
weekyearOfCentury | public DateTimeField weekyearOfCentury()(Code) | | Get the year of a week based year in a century field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
weekyears | public DurationField weekyears()(Code) | | Get the weekyears duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
withUTC | abstract public Chronology withUTC()(Code) | | 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.
a version of this chronology that ignores time zones |
year | public DateTimeField year()(Code) | | Get the year field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
yearOfCentury | public DateTimeField yearOfCentury()(Code) | | Get the year of century field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
yearOfEra | public DateTimeField yearOfEra()(Code) | | Get the year of era field for this chronology.
DateTimeField or UnsupportedDateTimeField if unsupported |
years | public DurationField years()(Code) | | Get the years duration field for this chronology.
DurationField or UnsupportedDurationField if unsupported |
Methods inherited from org.joda.time.Chronology | abstract public long add(ReadablePeriod period, long instant, int scalar)(Code)(Java Doc) abstract public long add(long instant, long duration, int scalar)(Code)(Java Doc) abstract public DurationField centuries()(Code)(Java Doc) abstract public DateTimeField centuryOfEra()(Code)(Java Doc) abstract public DateTimeField clockhourOfDay()(Code)(Java Doc) abstract public DateTimeField clockhourOfHalfday()(Code)(Java Doc) abstract public DateTimeField dayOfMonth()(Code)(Java Doc) abstract public DateTimeField dayOfWeek()(Code)(Java Doc) abstract public DateTimeField dayOfYear()(Code)(Java Doc) abstract public DurationField days()(Code)(Java Doc) abstract public DateTimeField era()(Code)(Java Doc) abstract public DurationField eras()(Code)(Java Doc) abstract public int[] get(ReadablePartial partial, long instant)(Code)(Java Doc) abstract public int[] get(ReadablePeriod period, long startInstant, long endInstant)(Code)(Java Doc) abstract public int[] get(ReadablePeriod period, long duration)(Code)(Java Doc) public static Chronology getBuddhist()(Code)(Java Doc) public static Chronology getBuddhist(DateTimeZone zone)(Code)(Java Doc) public static Chronology getBuddhistUTC()(Code)(Java Doc) public static Chronology getCoptic()(Code)(Java Doc) public static Chronology getCoptic(DateTimeZone zone)(Code)(Java Doc) public static Chronology getCopticUTC()(Code)(Java Doc) abstract public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int millisOfDay)(Code)(Java Doc) abstract public long getDateTimeMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code)(Java Doc) abstract public long getDateTimeMillis(long instant, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code)(Java Doc) public static Chronology getGJ()(Code)(Java Doc) public static Chronology getGJ(DateTimeZone zone)(Code)(Java Doc) public static Chronology getGJUTC()(Code)(Java Doc) public static Chronology getGregorian()(Code)(Java Doc) public static Chronology getGregorian(DateTimeZone zone)(Code)(Java Doc) public static Chronology getGregorianUTC()(Code)(Java Doc) public static Chronology getISO()(Code)(Java Doc) public static Chronology getISO(DateTimeZone zone)(Code)(Java Doc) public static Chronology getISOUTC()(Code)(Java Doc) public static Chronology getJulian()(Code)(Java Doc) public static Chronology getJulian(DateTimeZone zone)(Code)(Java Doc) public static Chronology getJulianUTC()(Code)(Java Doc) abstract public DateTimeZone getZone()(Code)(Java Doc) abstract public DateTimeField halfdayOfDay()(Code)(Java Doc) abstract public DurationField halfdays()(Code)(Java Doc) abstract public DateTimeField hourOfDay()(Code)(Java Doc) abstract public DateTimeField hourOfHalfday()(Code)(Java Doc) abstract public DurationField hours()(Code)(Java Doc) abstract public DurationField millis()(Code)(Java Doc) abstract public DateTimeField millisOfDay()(Code)(Java Doc) abstract public DateTimeField millisOfSecond()(Code)(Java Doc) abstract public DateTimeField minuteOfDay()(Code)(Java Doc) abstract public DateTimeField minuteOfHour()(Code)(Java Doc) abstract public DurationField minutes()(Code)(Java Doc) abstract public DateTimeField monthOfYear()(Code)(Java Doc) abstract public DurationField months()(Code)(Java Doc) abstract public DateTimeField secondOfDay()(Code)(Java Doc) abstract public DateTimeField secondOfMinute()(Code)(Java Doc) abstract public DurationField seconds()(Code)(Java Doc) abstract public long set(ReadablePartial partial, long instant)(Code)(Java Doc) abstract public String toString()(Code)(Java Doc) abstract public void validate(ReadablePartial partial, int[] values)(Code)(Java Doc) abstract public DateTimeField weekOfWeekyear()(Code)(Java Doc) abstract public DurationField weeks()(Code)(Java Doc) abstract public DateTimeField weekyear()(Code)(Java Doc) abstract public DateTimeField weekyearOfCentury()(Code)(Java Doc) abstract public DurationField weekyears()(Code)(Java Doc) abstract public Chronology withUTC()(Code)(Java Doc) abstract public Chronology withZone(DateTimeZone zone)(Code)(Java Doc) abstract public DateTimeField year()(Code)(Java Doc) abstract public DateTimeField yearOfCentury()(Code)(Java Doc) abstract public DateTimeField yearOfEra()(Code)(Java Doc) abstract public DurationField years()(Code)(Java Doc)
|
|
|