| java.lang.Object | ||
| ↳ | org.joda.time.base.AbstractInstant | |
| ↳ | org.joda.time.base.AbstractDateTime | |
   Known Direct Subclasses
  
 | 
   Known Indirect Subclasses
  
 | 
AbstractDateTime provides the common behaviour for datetime classes.
 This class should generally not be used directly by API users.
 The ReadableDateTime interface should be used when different 
 kinds of date/time objects are to be referenced.
 
 Whenever you want to implement ReadableDateTime you should
 extend this class.
 
AbstractDateTime subclasses may be mutable and not thread-safe.
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructor. 
  
   | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Get the value of one of the fields of a datetime. 
  
   | |||||||||||
Get the year of era field value. 
  
   | |||||||||||
Get the day of month field value. 
  
   | |||||||||||
Get the day of week field value. 
  
   | |||||||||||
Get the day of year field value. 
  
   | |||||||||||
Get the era field value. 
  
   | |||||||||||
Get the hour of day field value. 
  
   | |||||||||||
Get the millis of day field value. 
  
   | |||||||||||
Get the millis of second field value. 
  
   | |||||||||||
Get the minute of day field value. 
  
   | |||||||||||
Get the minute of hour field value. 
  
   | |||||||||||
Get the month of year field value. 
  
   | |||||||||||
Get the second of day field value. 
  
   | |||||||||||
Get the second of minute field value. 
  
   | |||||||||||
Get the week of weekyear field value. 
  
   | |||||||||||
Get the weekyear field value. 
  
   | |||||||||||
Get the year field value. 
  
   | |||||||||||
Get the year of century field value. 
  
   | |||||||||||
Get the year of era field value. 
  
   | |||||||||||
Get the date time as a  
  
  java.util.Calendar, assigning
 exactly the same millisecond instant. | |||||||||||
Get the date time as a  
  
  java.util.GregorianCalendar,
 assigning exactly the same millisecond instant. | |||||||||||
Output the instant using the specified format pattern. 
  
   | |||||||||||
Output the instant using the specified format pattern. 
  
   | |||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  org.joda.time.base.AbstractInstant
 | |||||||||||
   
From class
  java.lang.Object
 | |||||||||||
   
From interface
  java.lang.Comparable
 | |||||||||||
   
From interface
  org.joda.time.ReadableDateTime
 | |||||||||||
   
From interface
  org.joda.time.ReadableInstant
 | |||||||||||
Constructor.
Get the value of one of the fields of a datetime.
This method uses the chronology of the datetime to obtain the value. It is essentially a generic way of calling one of the get methods.
| type | a field type, usually obtained from DateTimeFieldType | 
|---|
| IllegalArgumentException | if the field type is null | 
|---|
Get the year of era field value.
Get the day of month field value.
 The values for the day of month are defined in DateTimeConstants.
Get the day of week field value.
 The values for the day of week are defined in DateTimeConstants.
Get the day of year field value.
Get the era field value.
Get the hour of day field value.
Get the millis of day field value.
Get the millis of second field value.
Get the minute of day field value.
Get the minute of hour field value.
Get the month of year field value.
Get the second of day field value.
Get the second of minute field value.
Get the week of weekyear field value.
Get the weekyear field value.
Get the year field value.
Get the year of century field value.
Get the year of era field value.
Get the date time as a java.util.Calendar, assigning
 exactly the same millisecond instant.
 The locale is passed in, enabling Calendar to select the correct
 localized subclass.
 
 The JDK and Joda-Time both have time zone implementations and these
 differ in accuracy. Joda-Time's implementation is generally more up to
 date and thus more accurate - for example JDK1.3 has no historical data.
 The effect of this is that the field values of the Calendar
 may differ from those of this object, even though the milliseond value
 is the same. Most of the time this just means that the JDK field values
 are wrong, as our time zone information is more up to date.
| locale | the locale to get the Calendar for, or default if null | 
|---|
Get the date time as a java.util.GregorianCalendar,
 assigning exactly the same millisecond instant.
 
 The JDK and Joda-Time both have time zone implementations and these
 differ in accuracy. Joda-Time's implementation is generally more up to
 date and thus more accurate - for example JDK1.3 has no historical data.
 The effect of this is that the field values of the Calendar
 may differ from those of this object, even though the milliseond value
 is the same. Most of the time this just means that the JDK field values
 are wrong, as our time zone information is more up to date.
Output the instant using the specified format pattern.
| pattern | the pattern specification, null means use toString | 
        
|---|---|
| locale | Locale to use, null means default | 
| IllegalArgumentException | 
|---|
Output the instant using the specified format pattern.
| pattern | the pattern specification, null means use toString | 
        
|---|