org.joda.time
Interface ReadableDateTime
- Comparable, ReadableInstant
- ReadWritableDateTime
- AbstractDateTime, BaseDateTime, DateMidnight, DateTime, MutableDateTime
public interface ReadableDateTime
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.
- Stephen Colebourne
- Brian S O'Neill
compareTo , equals , get , getChronology , getMillis , getZone , hashCode , isAfter , isBefore , isEqual , isSupported , toInstant , toString |
getCenturyOfEra
public int getCenturyOfEra()
Get the year of era field value.
getDayOfMonth
public int getDayOfMonth()
Get the day of month field value.
getDayOfWeek
public int getDayOfWeek()
Get the day of week field value.
The values for the day of week are defined in
DateTimeConstants
.
getDayOfYear
public int getDayOfYear()
Get the day of year field value.
getEra
public int getEra()
Get the era field value.
getHourOfDay
public int getHourOfDay()
Get the hour of day field value.
getMillisOfDay
public int getMillisOfDay()
Get the millis of day field value.
getMillisOfSecond
public int getMillisOfSecond()
Get the millis of second field value.
getMinuteOfDay
public int getMinuteOfDay()
Get the minute of day field value.
getMinuteOfHour
public int getMinuteOfHour()
Get the minute of hour field value.
getMonthOfYear
public int getMonthOfYear()
Get the month of year field value.
getSecondOfDay
public int getSecondOfDay()
Get the second of day field value.
getSecondOfMinute
public int getSecondOfMinute()
Get the second of minute field value.
getWeekOfWeekyear
public int getWeekOfWeekyear()
Get the week of weekyear field value.
- the week of a week based year
getWeekyear
public int getWeekyear()
Get the weekyear field value.
- the year of a week based year
getYear
public int getYear()
Get the year field value.
getYearOfCentury
public int getYearOfCentury()
Get the year of century field value.
getYearOfEra
public int getYearOfEra()
Get the year of era field value.
toDateTime
public DateTime toDateTime()
Get this object as a DateTime.
If the implementation of the interface is a DateTime, it is returned directly.
- a DateTime using the same millis
toMutableDateTime
public MutableDateTime toMutableDateTime()
Get this object as a MutableDateTime, always returning a new instance.
- a MutableDateTime using the same millis
toString
public String toString(String pattern)
throws IllegalArgumentException
Output the instant using the specified format pattern.
pattern
- pattern specification
toString
public String toString(String pattern,
Locale locale)
throws IllegalArgumentException
Output the instant using the specified format pattern.
pattern
- pattern specificationlocale
- Locale to use, or null for default
Copyright (c) 2001-2006 - Joda.org