|
|||||||||
| Home >> All >> org >> joda >> [ time overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.joda.time
Class MutableDateTime

java.lang.Objectorg.joda.time.base.AbstractInstant
org.joda.time.base.AbstractDateTime
org.joda.time.base.BaseDateTime
org.joda.time.MutableDateTime
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, ReadableDateTime, ReadableInstant, ReadWritableDateTime, ReadWritableInstant, java.io.Serializable
- public class MutableDateTime
- extends org.joda.time.base.BaseDateTime
- implements ReadWritableDateTime, java.lang.Cloneable, java.io.Serializable
- extends org.joda.time.base.BaseDateTime
MutableDateTime is the standard implementation of a modifiable datetime class. It holds the datetime as milliseconds from the Java epoch of 1970-01-01T00:00:00Z.
This class uses a Chronology internally. The Chronology determines how the
millisecond instant value is converted into the date time fields.
The default Chronology is ISOChronology which is the agreed
international standard and compatable with the modern Gregorian calendar.
Each individual field can be accessed in two ways:
getHourOfDay()hourOfDay().get()
- get numeric value
- set numeric value
- add to numeric value
- add to numeric value wrapping with the field
- get text vlaue
- get short text value
- set text value
- field maximum value
- field minimum value
MutableDateTime is mutable and not thread-safe, unless concurrent threads are not invoking mutator methods.
- Since:
- 1.0
| Nested Class Summary | |
static class |
MutableDateTime.Property
MutableDateTime.Property binds a MutableDateTime to a DateTimeField allowing powerful datetime functionality to be easily accessed. |
| Field Summary | |
private DateTimeField |
iRoundingField
The field to round on |
private int |
iRoundingMode
The mode of rounding |
static int |
ROUND_CEILING
Rounding mode as described by DateTimeField.roundCeiling(long) 55 |
static int |
ROUND_FLOOR
Rounding mode as described by DateTimeField.roundFloor(long) 55 |
static int |
ROUND_HALF_CEILING
Rounding mode as described by DateTimeField.roundHalfCeiling(long) 55 |
static int |
ROUND_HALF_EVEN
Rounding mode as described by DateTimeField.roundHalfEven(long) 55 |
static int |
ROUND_HALF_FLOOR
Rounding mode as described by DateTimeField.roundHalfFloor(long) 55 |
static int |
ROUND_NONE
Rounding is disabled |
private static long |
serialVersionUID
Serialization version |
| Fields inherited from class org.joda.time.base.BaseDateTime |
|
| Constructor Summary | |
MutableDateTime()
Constructs an instance set to the current system millisecond time using ISOChronology in the default time zone. |
|
MutableDateTime(Chronology chronology)
Constructs an instance set to the current system millisecond time using the specified chronology. |
|
MutableDateTime(DateTimeZone zone)
Constructs an instance set to the current system millisecond time using ISOChronology in the specified time zone. |
|
MutableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
Constructs an instance from datetime field values using ISOChronology in the default time zone. |
|
MutableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
Chronology chronology)
Constructs an instance from datetime field values using the specified chronology. |
|
MutableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
DateTimeZone zone)
Constructs an instance from datetime field values using ISOChronology in the specified time zone. |
|
MutableDateTime(long instant)
Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using ISOChronology in the default time zone. |
|
MutableDateTime(long instant,
Chronology chronology)
Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using the specified chronology. |
|
MutableDateTime(long instant,
DateTimeZone zone)
Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z using ISOChronology in the specified time zone. |
|
MutableDateTime(java.lang.Object instant)
Constructs an instance from an Object that represents a datetime. |
|
MutableDateTime(java.lang.Object instant,
Chronology chronology)
Constructs an instance from an Object that represents a datetime, using the specified chronology. |
|
MutableDateTime(java.lang.Object instant,
DateTimeZone zone)
Constructs an instance from an Object that represents a datetime, forcing the time zone to that specified. |
|
| Method Summary | |
void |
add(DurationFieldType type,
int amount)
Adds to the instant specifying the duration and multiple to add. |
void |
add(long duration)
Add an amount of time to the datetime. |
void |
add(ReadableDuration duration)
Adds a duration to this instant. |
void |
add(ReadableDuration duration,
int scalar)
Adds a duration to this instant specifying how many times to add. |
void |
add(ReadablePeriod period)
Adds a period to this instant. |
void |
add(ReadablePeriod period,
int scalar)
Adds a period to this instant specifying how many times to add. |
void |
addDays(int days)
Add a number of days to the date. |
void |
addHours(int hours)
Add a number of hours to the date. |
void |
addMillis(int millis)
Add a number of milliseconds to the date. |
void |
addMinutes(int minutes)
Add a number of minutes to the date. |
void |
addMonths(int months)
Add a number of months to the date. |
void |
addSeconds(int seconds)
Add a number of seconds to the date. |
void |
addWeeks(int weeks)
Add a number of weeks to the date. |
void |
addWeekyears(int weekyears)
Add a number of weekyears to the date. |
void |
addYears(int years)
Add a number of years to the date. |
MutableDateTime.Property |
centuryOfEra()
Get the century of era property. |
java.lang.Object |
clone()
Clone this object. |
MutableDateTime |
copy()
Clone this object without having to cast the returned object. |
MutableDateTime.Property |
dayOfMonth()
Get the day of month property. |
MutableDateTime.Property |
dayOfWeek()
Get the day of week property. |
MutableDateTime.Property |
dayOfYear()
Get the day of year property. |
MutableDateTime.Property |
era()
Get the era property. |
DateTimeField |
getRoundingField()
Gets the field used for rounding this instant, returning null if rounding is not enabled. |
int |
getRoundingMode()
Gets the rounding mode for this instant, returning ROUND_NONE if rounding is not enabled. |
MutableDateTime.Property |
hourOfDay()
Get the hour of day field property |
MutableDateTime.Property |
millisOfDay()
Get the millis of day property |
MutableDateTime.Property |
millisOfSecond()
Get the millis of second property |
MutableDateTime.Property |
minuteOfDay()
Get the minute of day property |
MutableDateTime.Property |
minuteOfHour()
Get the minute of hour field property |
MutableDateTime.Property |
monthOfYear()
Get the month of year property. |
MutableDateTime.Property |
secondOfDay()
Get the second of day property |
MutableDateTime.Property |
secondOfMinute()
Get the second of minute field property |
void |
set(DateTimeFieldType type,
int value)
Sets the value of one of the fields of the instant, such as hourOfDay. |
void |
setChronology(Chronology chronology)
Set the chronology of the datetime. |
void |
setDate(int year,
int monthOfYear,
int dayOfMonth)
Set the date from fields. |
void |
setDate(long instant)
Set the date from milliseconds. |
void |
setDate(ReadableInstant instant)
Set the date from another instant. |
void |
setDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
Set the date and time from fields. |
void |
setDayOfMonth(int dayOfMonth)
Set the day of the month to the specified value. |
void |
setDayOfWeek(int dayOfWeek)
Set the day of week to the specified value. |
void |
setDayOfYear(int dayOfYear)
Set the day of year to the specified value. |
void |
setHourOfDay(int hourOfDay)
Set the hour of the day to the specified value. |
void |
setMillis(long instant)
Set the milliseconds of the datetime. |
void |
setMillis(ReadableInstant instant)
Sets the millisecond instant of this instant from another. |
void |
setMillisOfDay(int millisOfDay)
Set the millis of the day to the specified value. |
void |
setMillisOfSecond(int millisOfSecond)
Set the millis of the second to the specified value. |
void |
setMinuteOfDay(int minuteOfDay)
Set the minute of the day to the specified value. |
void |
setMinuteOfHour(int minuteOfHour)
Set the minute of the hour to the specified value. |
void |
setMonthOfYear(int monthOfYear)
Set the month of the year to the specified value. |
void |
setRounding(DateTimeField field)
Sets the status of rounding to use the specified field and ROUND_FLOOR mode. |
void |
setRounding(DateTimeField field,
int mode)
Sets the status of rounding to use the specified field and mode. |
void |
setSecondOfDay(int secondOfDay)
Set the second of the day to the specified value. |
void |
setSecondOfMinute(int secondOfMinute)
Set the second of the minute to the specified value. |
void |
setTime(int hour,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
Set the time from fields. |
void |
setTime(long millis)
Set the time from milliseconds. |
void |
setTime(ReadableInstant instant)
Set the time from another instant. |
void |
setWeekOfWeekyear(int weekOfWeekyear)
Set the week of weekyear to the specified value. |
void |
setWeekyear(int weekyear)
Set the weekyear to the specified value. |
void |
setYear(int year)
Set the year to the specified value. |
void |
setZone(DateTimeZone newZone)
Sets the time zone of the datetime, changing the chronology and field values. |
void |
setZoneRetainFields(DateTimeZone newZone)
Sets the time zone of the datetime, changing the chronology and millisecond. |
java.lang.String |
toString()
Output the date time in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ). |
MutableDateTime.Property |
weekOfWeekyear()
Get the week of a week based year property. |
MutableDateTime.Property |
weekyear()
Get the year of a week based year property. |
MutableDateTime.Property |
year()
Get the year property. |
MutableDateTime.Property |
yearOfCentury()
Get the year of century property. |
MutableDateTime.Property |
yearOfEra()
Get the year of era property. |
| Methods inherited from class org.joda.time.base.BaseDateTime |
checkChronology, checkInstant, getChronology, getMillis |
| Methods inherited from class org.joda.time.base.AbstractDateTime |
get, getCenturyOfEra, getDayOfMonth, getDayOfWeek, getDayOfYear, getEra, getHourOfDay, getMillisOfDay, getMillisOfSecond, getMinuteOfDay, getMinuteOfHour, getMonthOfYear, getSecondOfDay, getSecondOfMinute, getWeekOfWeekyear, getWeekyear, getYear, getYearOfCentury, getYearOfEra, toCalendar, toGregorianCalendar, toString, toString |
| Methods inherited from class org.joda.time.base.AbstractInstant |
compareTo, equals, get, getZone, hashCode, isAfter, isAfter, isAfterNow, isBefore, isBefore, isBeforeNow, isEqual, isEqual, isEqualNow, isSupported, toDate, toDateTime, toDateTime, toDateTime, toDateTimeISO, toInstant, toMutableDateTime, toMutableDateTime, toMutableDateTime, toMutableDateTimeISO, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.joda.time.ReadableDateTime |
getCenturyOfEra, getDayOfMonth, getDayOfWeek, getDayOfYear, getEra, getHourOfDay, getMillisOfDay, getMillisOfSecond, getMinuteOfDay, getMinuteOfHour, getMonthOfYear, getSecondOfDay, getSecondOfMinute, getWeekOfWeekyear, getWeekyear, getYear, getYearOfCentury, getYearOfEra, toDateTime, toMutableDateTime, toString, toString |
| Methods inherited from interface org.joda.time.ReadableInstant |
compareTo, equals, get, getChronology, getMillis, getZone, hashCode, isAfter, isBefore, isEqual, isSupported, toInstant |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- Serialization version
- See Also:
- Constant Field Values
ROUND_NONE
public static final int ROUND_NONE
- Rounding is disabled
- See Also:
- Constant Field Values
ROUND_FLOOR
public static final int ROUND_FLOOR
- Rounding mode as described by
DateTimeField.roundFloor(long)55- See Also:
- Constant Field Values
ROUND_CEILING
public static final int ROUND_CEILING
- Rounding mode as described by
DateTimeField.roundCeiling(long)55- See Also:
- Constant Field Values
ROUND_HALF_FLOOR
public static final int ROUND_HALF_FLOOR
- Rounding mode as described by
DateTimeField.roundHalfFloor(long)55- See Also:
- Constant Field Values
ROUND_HALF_CEILING
public static final int ROUND_HALF_CEILING
- Rounding mode as described by
DateTimeField.roundHalfCeiling(long)55- See Also:
- Constant Field Values
ROUND_HALF_EVEN
public static final int ROUND_HALF_EVEN
- Rounding mode as described by
DateTimeField.roundHalfEven(long)55- See Also:
- Constant Field Values
iRoundingField
private DateTimeField iRoundingField
- The field to round on
iRoundingMode
private int iRoundingMode
- The mode of rounding
| Constructor Detail |
MutableDateTime
public MutableDateTime()
- Constructs an instance set to the current system millisecond time
using
ISOChronologyin the default time zone.
MutableDateTime
public MutableDateTime(DateTimeZone zone)
- Constructs an instance set to the current system millisecond time
using
ISOChronologyin the specified time zone.If the specified time zone is null, the default zone is used.
MutableDateTime
public MutableDateTime(Chronology chronology)
- Constructs an instance set to the current system millisecond time
using the specified chronology.
If the chronology is null,
ISOChronologyin the default time zone is used.
MutableDateTime
public MutableDateTime(long instant)
- Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using
ISOChronologyin the default time zone.
MutableDateTime
public MutableDateTime(long instant,
DateTimeZone zone)
- Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using
ISOChronologyin the specified time zone.If the specified time zone is null, the default zone is used.
MutableDateTime
public MutableDateTime(long instant,
Chronology chronology)
- Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using the specified chronology.
If the chronology is null,
ISOChronologyin the default time zone is used.
MutableDateTime
public MutableDateTime(java.lang.Object instant)
- Constructs an instance from an Object that represents a datetime.
If the object implies a chronology (such as GregorianCalendar does), then that chronology will be used. Otherwise, ISO default is used. Thus if a GregorianCalendar is passed in, the chronology used will be GJ, but if a Date is passed in the chronology will be ISO.
The recognised object types are defined in ConverterManager and include ReadableInstant, String, Calendar and Date.
MutableDateTime
public MutableDateTime(java.lang.Object instant, DateTimeZone zone)
- Constructs an instance from an Object that represents a datetime,
forcing the time zone to that specified.
If the object implies a chronology (such as GregorianCalendar does), then that chronology will be used, but with the time zone adjusted. Otherwise, ISO is used in the specified time zone. If the specified time zone is null, the default zone is used. Thus if a GregorianCalendar is passed in, the chronology used will be GJ, but if a Date is passed in the chronology will be ISO.
The recognised object types are defined in ConverterManager and include ReadableInstant, String, Calendar and Date.
MutableDateTime
public MutableDateTime(java.lang.Object instant, Chronology chronology)
- Constructs an instance from an Object that represents a datetime,
using the specified chronology.
If the chronology is null, ISO in the default time zone is used. Any chronology implied by the object (such as GregorianCalendar does) is ignored.
The recognised object types are defined in ConverterManager and include ReadableInstant, String, Calendar and Date.
MutableDateTime
public MutableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
- Constructs an instance from datetime field values
using
ISOChronologyin the default time zone.
MutableDateTime
public MutableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
DateTimeZone zone)
- Constructs an instance from datetime field values
using
ISOChronologyin the specified time zone.If the specified time zone is null, the default zone is used.
MutableDateTime
public MutableDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond,
Chronology chronology)
- Constructs an instance from datetime field values
using the specified chronology.
If the chronology is null,
ISOChronologyin the default time zone is used.
| Method Detail |
getRoundingField
public DateTimeField getRoundingField()
- Gets the field used for rounding this instant, returning null if rounding
is not enabled.
getRoundingMode
public int getRoundingMode()
- Gets the rounding mode for this instant, returning ROUND_NONE if rounding
is not enabled.
setRounding
public void setRounding(DateTimeField field)
- Sets the status of rounding to use the specified field and ROUND_FLOOR mode.
A null field will disable rounding.
Once set, the instant is then rounded using the new field and mode.
Enabling rounding will cause all subsequent calls to
setMillis(long)55 to be rounded. This can be used to control the precision of the instant, for example by setting a rounding field of minuteOfDay, the seconds and milliseconds will always be zero.
setRounding
public void setRounding(DateTimeField field, int mode)
- Sets the status of rounding to use the specified field and mode.
A null field or mode of ROUND_NONE will disable rounding.
Once set, the instant is then rounded using the new field and mode.
Enabling rounding will cause all subsequent calls to
setMillis(long)55 to be rounded. This can be used to control the precision of the instant, for example by setting a rounding field of minuteOfDay, the seconds and milliseconds will always be zero.
setMillis
public void setMillis(long instant)
- Set the milliseconds of the datetime.
All changes to the millisecond field occurs via this method.
- Specified by:
setMillisin interfaceReadWritableInstant
setMillis
public void setMillis(ReadableInstant instant)
- Sets the millisecond instant of this instant from another.
This method does not change the chronology of this instant, just the millisecond instant.
- Specified by:
setMillisin interfaceReadWritableInstant
add
public void add(long duration)
- Add an amount of time to the datetime.
- Specified by:
addin interfaceReadWritableInstant
add
public void add(ReadableDuration duration)
- Adds a duration to this instant.
This will typically change the value of most fields.
- Specified by:
addin interfaceReadWritableInstant
add
public void add(ReadableDuration duration, int scalar)
- Adds a duration to this instant specifying how many times to add.
This will typically change the value of most fields.
- Specified by:
addin interfaceReadWritableInstant
add
public void add(ReadablePeriod period)
- Adds a period to this instant.
This will typically change the value of most fields.
- Specified by:
addin interfaceReadWritableInstant
add
public void add(ReadablePeriod period, int scalar)
- Adds a period to this instant specifying how many times to add.
This will typically change the value of most fields.
- Specified by:
addin interfaceReadWritableInstant
setChronology
public void setChronology(Chronology chronology)
- Set the chronology of the datetime.
All changes to the chronology occur via this method.
- Specified by:
setChronologyin interfaceReadWritableInstant
setZone
public void setZone(DateTimeZone newZone)
- Sets the time zone of the datetime, changing the chronology and field values.
Changing the zone using this method retains the millisecond instant. The millisecond instant is adjusted in the new zone to compensate. chronology. Setting the time zone does not affect the millisecond value of this instant.
If the chronology already has this time zone, no change occurs.
- Specified by:
setZonein interfaceReadWritableInstant
setZoneRetainFields
public void setZoneRetainFields(DateTimeZone newZone)
- Sets the time zone of the datetime, changing the chronology and millisecond.
Changing the zone using this method retains the field values. The millisecond instant is adjusted in the new zone to compensate.
If the chronology already has this time zone, no change occurs.
- Specified by:
setZoneRetainFieldsin interfaceReadWritableInstant
set
public void set(DateTimeFieldType type, int value)
- Sets the value of one of the fields of the instant, such as hourOfDay.
- Specified by:
setin interfaceReadWritableInstant
add
public void add(DurationFieldType type, int amount)
- Adds to the instant specifying the duration and multiple to add.
- Specified by:
addin interfaceReadWritableInstant
setYear
public void setYear(int year)
- Set the year to the specified value.
- Specified by:
setYearin interfaceReadWritableDateTime
addYears
public void addYears(int years)
- Add a number of years to the date.
- Specified by:
addYearsin interfaceReadWritableDateTime
setWeekyear
public void setWeekyear(int weekyear)
- Set the weekyear to the specified value.
- Specified by:
setWeekyearin interfaceReadWritableDateTime
addWeekyears
public void addWeekyears(int weekyears)
- Add a number of weekyears to the date.
- Specified by:
addWeekyearsin interfaceReadWritableDateTime
setMonthOfYear
public void setMonthOfYear(int monthOfYear)
- Set the month of the year to the specified value.
- Specified by:
setMonthOfYearin interfaceReadWritableDateTime
addMonths
public void addMonths(int months)
- Add a number of months to the date.
- Specified by:
addMonthsin interfaceReadWritableDateTime
setWeekOfWeekyear
public void setWeekOfWeekyear(int weekOfWeekyear)
- Set the week of weekyear to the specified value.
- Specified by:
setWeekOfWeekyearin interfaceReadWritableDateTime
addWeeks
public void addWeeks(int weeks)
- Add a number of weeks to the date.
- Specified by:
addWeeksin interfaceReadWritableDateTime
setDayOfYear
public void setDayOfYear(int dayOfYear)
- Set the day of year to the specified value.
- Specified by:
setDayOfYearin interfaceReadWritableDateTime
setDayOfMonth
public void setDayOfMonth(int dayOfMonth)
- Set the day of the month to the specified value.
- Specified by:
setDayOfMonthin interfaceReadWritableDateTime
setDayOfWeek
public void setDayOfWeek(int dayOfWeek)
- Set the day of week to the specified value.
- Specified by:
setDayOfWeekin interfaceReadWritableDateTime
addDays
public void addDays(int days)
- Add a number of days to the date.
- Specified by:
addDaysin interfaceReadWritableDateTime
setHourOfDay
public void setHourOfDay(int hourOfDay)
- Set the hour of the day to the specified value.
- Specified by:
setHourOfDayin interfaceReadWritableDateTime
addHours
public void addHours(int hours)
- Add a number of hours to the date.
- Specified by:
addHoursin interfaceReadWritableDateTime
setMinuteOfDay
public void setMinuteOfDay(int minuteOfDay)
- Set the minute of the day to the specified value.
- Specified by:
setMinuteOfDayin interfaceReadWritableDateTime
setMinuteOfHour
public void setMinuteOfHour(int minuteOfHour)
- Set the minute of the hour to the specified value.
- Specified by:
setMinuteOfHourin interfaceReadWritableDateTime
addMinutes
public void addMinutes(int minutes)
- Add a number of minutes to the date.
- Specified by:
addMinutesin interfaceReadWritableDateTime
setSecondOfDay
public void setSecondOfDay(int secondOfDay)
- Set the second of the day to the specified value.
- Specified by:
setSecondOfDayin interfaceReadWritableDateTime
setSecondOfMinute
public void setSecondOfMinute(int secondOfMinute)
- Set the second of the minute to the specified value.
- Specified by:
setSecondOfMinutein interfaceReadWritableDateTime
addSeconds
public void addSeconds(int seconds)
- Add a number of seconds to the date.
- Specified by:
addSecondsin interfaceReadWritableDateTime
setMillisOfDay
public void setMillisOfDay(int millisOfDay)
- Set the millis of the day to the specified value.
- Specified by:
setMillisOfDayin interfaceReadWritableDateTime
setMillisOfSecond
public void setMillisOfSecond(int millisOfSecond)
- Set the millis of the second to the specified value.
- Specified by:
setMillisOfSecondin interfaceReadWritableDateTime
addMillis
public void addMillis(int millis)
- Add a number of milliseconds to the date. The implementation of this
method differs from the
add(long)55 method in that a DateTimeField performs the addition.- Specified by:
addMillisin interfaceReadWritableDateTime
setDate
public void setDate(long instant)
- Set the date from milliseconds.
The time part of this object will be unaffected.
setDate
public void setDate(ReadableInstant instant)
- Set the date from another instant.
The time part of this object will be unaffected.
setDate
public void setDate(int year,
int monthOfYear,
int dayOfMonth)
- Set the date from fields.
The time part of this object will be unaffected.
- Specified by:
setDatein interfaceReadWritableDateTime
setTime
public void setTime(long millis)
- Set the time from milliseconds.
The date part of this object will be unaffected.
setTime
public void setTime(ReadableInstant instant)
- Set the time from another instant.
The date part of this object will be unaffected.
setTime
public void setTime(int hour,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
- Set the time from fields.
The date part of this object will be unaffected.
- Specified by:
setTimein interfaceReadWritableDateTime
setDateTime
public void setDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisOfSecond)
- Set the date and time from fields.
- Specified by:
setDateTimein interfaceReadWritableDateTime
era
public MutableDateTime.Property era()
- Get the era property.
centuryOfEra
public MutableDateTime.Property centuryOfEra()
- Get the century of era property.
yearOfCentury
public MutableDateTime.Property yearOfCentury()
- Get the year of century property.
yearOfEra
public MutableDateTime.Property yearOfEra()
- Get the year of era property.
year
public MutableDateTime.Property year()
- Get the year property.
weekyear
public MutableDateTime.Property weekyear()
- Get the year of a week based year property.
monthOfYear
public MutableDateTime.Property monthOfYear()
- Get the month of year property.
weekOfWeekyear
public MutableDateTime.Property weekOfWeekyear()
- Get the week of a week based year property.
dayOfYear
public MutableDateTime.Property dayOfYear()
- Get the day of year property.
dayOfMonth
public MutableDateTime.Property dayOfMonth()
- Get the day of month property.
The values for day of month are defined in DateTimeConstants.
dayOfWeek
public MutableDateTime.Property dayOfWeek()
- Get the day of week property.
The values for day of week are defined in DateTimeConstants.
hourOfDay
public MutableDateTime.Property hourOfDay()
- Get the hour of day field property
minuteOfDay
public MutableDateTime.Property minuteOfDay()
- Get the minute of day property
minuteOfHour
public MutableDateTime.Property minuteOfHour()
- Get the minute of hour field property
secondOfDay
public MutableDateTime.Property secondOfDay()
- Get the second of day property
secondOfMinute
public MutableDateTime.Property secondOfMinute()
- Get the second of minute field property
millisOfDay
public MutableDateTime.Property millisOfDay()
- Get the millis of day property
millisOfSecond
public MutableDateTime.Property millisOfSecond()
- Get the millis of second property
copy
public MutableDateTime copy()
- Clone this object without having to cast the returned object.
clone
public java.lang.Object clone()
- Clone this object.
toString
public java.lang.String toString()
- Output the date time in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ).
- Specified by:
toStringin interfaceReadableInstant
|
|||||||||
| Home >> All >> org >> joda >> [ time overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC