public interface

ReadableDateTime

implements ReadableInstant
org.joda.time.ReadableDateTime
Known Indirect Subclasses

Class Overview

Defines an instant in time that can be queried using datetime fields.

The implementation of this interface may be mutable or immutable. This interface only gives access to retrieve data, never to change it.

Methods in your application should be defined using ReadableDateTime as a parameter if the method only wants to read the datetime, and not perform any advanced manipulations.

Summary

Public Methods
abstract int getCenturyOfEra()
Get the year of era field value.
abstract int getDayOfMonth()
Get the day of month field value.
abstract int getDayOfWeek()
Get the day of week field value.
abstract int getDayOfYear()
Get the day of year field value.
abstract int getEra()
Get the era field value.
abstract int getHourOfDay()
Get the hour of day field value.
abstract int getMillisOfDay()
Get the millis of day field value.
abstract int getMillisOfSecond()
Get the millis of second field value.
abstract int getMinuteOfDay()
Get the minute of day field value.
abstract int getMinuteOfHour()
Get the minute of hour field value.
abstract int getMonthOfYear()
Get the month of year field value.
abstract int getSecondOfDay()
Get the second of day field value.
abstract int getSecondOfMinute()
Get the second of minute field value.
abstract int getWeekOfWeekyear()
Get the week of weekyear field value.
abstract int getWeekyear()
Get the weekyear field value.
abstract int getYear()
Get the year field value.
abstract int getYearOfCentury()
Get the year of century field value.
abstract int getYearOfEra()
Get the year of era field value.
abstract DateTime toDateTime()
Get this object as a DateTime.
abstract MutableDateTime toMutableDateTime()
Get this object as a MutableDateTime, always returning a new instance.
abstract String toString(String pattern, Locale locale)
Output the instant using the specified format pattern.
abstract String toString(String pattern)
Output the instant using the specified format pattern.
[Expand]
Inherited Methods
From interface java.lang.Comparable
From interface org.joda.time.ReadableInstant

Public Methods

public abstract int getCenturyOfEra ()

Get the year of era field value.

Returns
  • the year of era

public abstract int getDayOfMonth ()

Get the day of month field value.

Returns
  • the day of month

public abstract int getDayOfWeek ()

Get the day of week field value.

The values for the day of week are defined in DateTimeConstants.

Returns
  • the day of week

public abstract int getDayOfYear ()

Get the day of year field value.

Returns
  • the day of year

public abstract int getEra ()

Get the era field value.

Returns
  • the era

public abstract int getHourOfDay ()

Get the hour of day field value.

Returns
  • the hour of day

public abstract int getMillisOfDay ()

Get the millis of day field value.

Returns
  • the millis of day

public abstract int getMillisOfSecond ()

Get the millis of second field value.

Returns
  • the millis of second

public abstract int getMinuteOfDay ()

Get the minute of day field value.

Returns
  • the minute of day

public abstract int getMinuteOfHour ()

Get the minute of hour field value.

Returns
  • the minute of hour

public abstract int getMonthOfYear ()

Get the month of year field value.

Returns
  • the month of year

public abstract int getSecondOfDay ()

Get the second of day field value.

Returns
  • the second of day

public abstract int getSecondOfMinute ()

Get the second of minute field value.

Returns
  • the second of minute

public abstract int getWeekOfWeekyear ()

Get the week of weekyear field value.

Returns
  • the week of a week based year

public abstract int getWeekyear ()

Get the weekyear field value.

Returns
  • the year of a week based year

public abstract int getYear ()

Get the year field value.

Returns
  • the year

public abstract int getYearOfCentury ()

Get the year of century field value.

Returns
  • the year of century

public abstract int getYearOfEra ()

Get the year of era field value.

Returns
  • the year of era

public abstract DateTime toDateTime ()

Get this object as a DateTime.

If the implementation of the interface is a DateTime, it is returned directly.

Returns
  • a DateTime using the same millis

public abstract MutableDateTime toMutableDateTime ()

Get this object as a MutableDateTime, always returning a new instance.

Returns
  • a MutableDateTime using the same millis

public abstract String toString (String pattern, Locale locale)

Output the instant using the specified format pattern.

Parameters
pattern pattern specification
locale Locale to use, or null for default
Throws
IllegalArgumentException if pattern is invalid
See Also

public abstract String toString (String pattern)

Output the instant using the specified format pattern.

Parameters
pattern pattern specification
Throws
IllegalArgumentException if pattern is invalid
See Also