|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.joda.time.Chronology
|
+--org.joda.time.gj.GJChronology
GJChronology provides access to the individual date time fields for the GregorianJulian defined chronological calendar system.
The point in time when that chronology switches can be controlled using
setGregorianJulianCutover(). By default this is set to the
date the Gregorian calendar was first instituted, October 15, 1582.
Before this date, this chronology uses the proleptic Julian calendar (Proleptic means extending indefinitely). The Julian calendar has leap years every four years, whereas the Gregorian has special rules for 100 and 400 years. A meaningful result will thus be obtained for all input values. However before March 1, 4 CE, Julian leap years were irregular, and before 45 BCE there was no Julian calendar.
This chronology differs from GregorianCalendar in that years in
BCE are returned correctly. Thus 1 BCE is returned as -1.
| Method Summary | |
DateTimeField |
amPmOfDay()
Get the AM (0) PM(1) field for this chronology. |
DateTimeField |
dayOfMonth()
Get the day of month field for this chronology. |
DateTimeField |
dayOfWeek()
Get the day of week field for this chronology. |
DateTimeField |
dayOfYear()
Get the day of year field for this chronology. |
DateTimeField |
era()
Get the era field for this chronology. |
long |
getDateOnlyMillis(long millis)
Get the millis for a date only field. |
DateTimeZone |
getDateTimeZone()
Returns the DateTimeZone that this Chronology operates in, or null if unspecified. |
Instant |
getGregorianJulianCutover()
Gets the cutover instant between Gregorian and Julian chronologies. |
abstract long |
getGregorianJulianCutoverMillis()
Gets the cutover millis between Gregorian and Julian chronologies. |
static GJChronology |
getInstance()
Factory method returns instances of the default GJ chronology. |
static GJChronology |
getInstance(DateTimeZone zone)
Factory method returns instances of the default GJ chronology. |
static GJChronology |
getInstance(DateTimeZone zone,
long gregorianCutover,
boolean includeZero)
Factory method allowing the Gregorian cutover point and year zero handling to be set. |
static GJChronology |
getInstance(DateTimeZone zone,
ReadableInstant gregorianCutover,
boolean includeZero)
Factory method allowing the Gregorian cutover point and year zero handling to be set. |
long |
getTimeOnlyMillis(long millis)
Get the millis for a time only field. |
DateTimeField |
hourClockOfAmPm()
Get the hour of am/pm (offset to 1-12) field for this chronology. |
DateTimeField |
hourClockOfDay()
Get the hour of day (offset to 1-24) field for this chronology. |
DateTimeField |
hourOfAmPm()
Get the hour of am/pm (0-11) field for this chronology. |
DateTimeField |
hourOfDay()
Get the hour of day (0-23) field for this chronology. |
abstract boolean |
isIncludeYearZero()
Gets the flag to say whether to include year zero. |
DateTimeField |
leapYear()
Get the leap year flag field for this chronology. |
DateTimeField |
millisOfDay()
Get the millis of day field for this chronology. |
DateTimeField |
millisOfSecond()
Get the millis of second field for this chronology. |
DateTimeField |
minuteOfDay()
Get the minute of day field for this chronology. |
DateTimeField |
minuteOfHour()
Get the minute of hour field for this chronology. |
DateTimeField |
monthOfYear()
Get the month of year field for this chronology. |
DateTimeField |
secondOfDay()
Get the second of day field for this chronology. |
DateTimeField |
secondOfMinute()
Get the second of minute field for this chronology. |
DateTimeField |
weekOfYearWeek()
Get the week of year week field for this chronology. |
DateTimeField |
weekOfYearYear()
Get the week of year year field for this chronology. |
DateTimeField |
year()
Get the year field for this chronology. |
DateTimeField |
yearOfEra()
Get the year of era field for this chronology. |
| Methods inherited from class org.joda.time.Chronology |
asUTC |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static GJChronology getInstance()
The time zone of the returned instance is UTC.
public static GJChronology getInstance(DateTimeZone zone)
If the time zone specified is null, the default time zone is used.
zone - the time zone to use, or null if default
public static GJChronology getInstance(DateTimeZone zone,
ReadableInstant gregorianCutover,
boolean includeZero)
If the time zone specified is null, the default time zone is used.
zone - the time zone to use, or null if defaultgregorianCutover - the cutover as a ReadableInstant, null means defaultincludeZero - the flag as to whether to include year zero
public static GJChronology getInstance(DateTimeZone zone,
long gregorianCutover,
boolean includeZero)
If the time zone specified is null, the default time zone is used.
zone - the time zone to use, or null if defaultgregorianCutover - the cutover as milliseconds from 1970-01-01T00:00:00ZincludeZero - the flag as to whether to include year zeropublic DateTimeZone getDateTimeZone()
Chronology
getDateTimeZone in class Chronologypublic Instant getGregorianJulianCutover()
public abstract long getGregorianJulianCutoverMillis()
public abstract boolean isIncludeYearZero()
public long getTimeOnlyMillis(long millis)
getTimeOnlyMillis in class Chronologymillis - the millis to convert to time only
public long getDateOnlyMillis(long millis)
getDateOnlyMillis in class Chronologymillis - the millis to convert to date only
public DateTimeField millisOfSecond()
Chronology
millisOfSecond in class Chronologypublic DateTimeField millisOfDay()
Chronology
millisOfDay in class Chronologypublic DateTimeField secondOfMinute()
Chronology
secondOfMinute in class Chronologypublic DateTimeField secondOfDay()
Chronology
secondOfDay in class Chronologypublic DateTimeField minuteOfHour()
Chronology
minuteOfHour in class Chronologypublic DateTimeField minuteOfDay()
Chronology
minuteOfDay in class Chronologypublic DateTimeField hourOfDay()
Chronology
hourOfDay in class Chronologypublic DateTimeField hourClockOfDay()
Chronology
hourClockOfDay in class Chronologypublic DateTimeField hourOfAmPm()
Chronology
hourOfAmPm in class Chronologypublic DateTimeField hourClockOfAmPm()
Chronology
hourClockOfAmPm in class Chronologypublic DateTimeField amPmOfDay()
Chronology
amPmOfDay in class Chronologypublic DateTimeField dayOfWeek()
Chronology
dayOfWeek in class Chronologypublic DateTimeField dayOfMonth()
Chronology
dayOfMonth in class Chronologypublic DateTimeField dayOfYear()
Chronology
dayOfYear in class Chronologypublic DateTimeField weekOfYearWeek()
Chronology
weekOfYearWeek in class Chronologypublic DateTimeField weekOfYearYear()
Chronology
weekOfYearYear in class Chronologypublic DateTimeField monthOfYear()
Chronology
monthOfYear in class Chronologypublic DateTimeField year()
Chronology
year in class Chronologypublic DateTimeField yearOfEra()
Chronology
yearOfEra in class Chronologypublic DateTimeField era()
Chronology
era in class Chronologypublic DateTimeField leapYear()
Chronology
leapYear in class Chronology
|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||