| org.joda.time.base.BaseDateTime org.joda.time.MutableDateTime
MutableDateTime | public class MutableDateTime extends BaseDateTime implements ReadWritableDateTime,Cloneable,Serializable(Code) | | 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()
The second technique also provides access to other useful methods on the
field:
- 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.
author: Guy Allard author: Brian S O'Neill author: Stephen Colebourne author: Mike Schrag since: 1.0 See Also: DateTime |
Constructor Summary | |
public | MutableDateTime() Constructs an instance set to the current system millisecond time
using ISOChronology in the default time zone. | public | MutableDateTime(DateTimeZone zone) Constructs an instance set to the current system millisecond time
using ISOChronology in the specified time zone. | public | MutableDateTime(Chronology chronology) Constructs an instance set to the current system millisecond time
using the specified chronology. | public | MutableDateTime(long instant) Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using ISOChronology in the default time zone. | public | 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. | public | MutableDateTime(long instant, Chronology chronology) Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using the specified chronology. | public | MutableDateTime(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. | public | MutableDateTime(Object instant, DateTimeZone zone) Constructs an instance from an Object that represents a datetime,
forcing the time zone to that specified. | public | MutableDateTime(Object instant, Chronology chronology) Constructs an instance from an Object that represents a datetime,
using the specified chronology. | public | 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. | 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 ISOChronology in the specified time zone. | 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. |
Method Summary | |
public void | add(long duration) Add an amount of time to the datetime. | public void | add(ReadableDuration duration) Adds a duration to this instant. | public void | add(ReadableDuration duration, int scalar) Adds a duration to this instant specifying how many times to add. | public void | add(ReadablePeriod period) Adds a period to this instant. | public void | add(ReadablePeriod period, int scalar) Adds a period to this instant specifying how many times to add. | public void | add(DurationFieldType type, int amount) Adds to the instant specifying the duration and multiple to add. | public void | addDays(int days) Add a number of days to the date. | public void | addHours(int hours) Add a number of hours to the date. | public void | addMillis(int millis) Add a number of milliseconds to the date. | public void | addMinutes(int minutes) Add a number of minutes to the date. | public void | addMonths(int months) Add a number of months to the date. | public void | addSeconds(int seconds) Add a number of seconds to the date. | public void | addWeeks(int weeks) Add a number of weeks to the date. | public void | addWeekyears(int weekyears) Add a number of weekyears to the date. | public void | addYears(int years) Add a number of years to the date. | public Property | centuryOfEra() Get the century of era property. | public Object | clone() Clone this object. | public MutableDateTime | copy() Clone this object without having to cast the returned object. | public Property | dayOfMonth() Get the day of month property. | public Property | dayOfWeek() Get the day of week property. | public Property | dayOfYear() Get the day of year property. | public Property | era() Get the era property. | public DateTimeField | getRoundingField() Gets the field used for rounding this instant, returning null if rounding
is not enabled. | public int | getRoundingMode() Gets the rounding mode for this instant, returning ROUND_NONE if rounding
is not enabled. | public Property | hourOfDay() | public Property | millisOfDay() | public Property | millisOfSecond() | public Property | minuteOfDay() | public Property | minuteOfHour() | public Property | monthOfYear() Get the month of year property. | public Property | property(DateTimeFieldType type) Gets the property object for the specified type, which contains many useful methods. | public Property | secondOfDay() | public Property | secondOfMinute() | public void | set(DateTimeFieldType type, int value) Sets the value of one of the fields of the instant, such as hourOfDay. | public void | setChronology(Chronology chronology) Set the chronology of the datetime. | public void | setDate(long instant) Set the date from milliseconds. | public void | setDate(ReadableInstant instant) Set the date from another instant. | public void | setDate(int year, int monthOfYear, int dayOfMonth) Set the date from fields. | public void | setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond) Set the date and time from fields. | public void | setDayOfMonth(int dayOfMonth) Set the day of the month to the specified value. | public void | setDayOfWeek(int dayOfWeek) Set the day of week to the specified value. | public void | setDayOfYear(int dayOfYear) Set the day of year to the specified value. | public void | setHourOfDay(int hourOfDay) Set the hour of the day to the specified value. | public void | setMillis(long instant) Set the milliseconds of the datetime. | public void | setMillis(ReadableInstant instant) Sets the millisecond instant of this instant from another. | public void | setMillisOfDay(int millisOfDay) Set the millis of the day to the specified value. | public void | setMillisOfSecond(int millisOfSecond) Set the millis of the second to the specified value. | public void | setMinuteOfDay(int minuteOfDay) Set the minute of the day to the specified value. | public void | setMinuteOfHour(int minuteOfHour) Set the minute of the hour to the specified value. | public void | setMonthOfYear(int monthOfYear) Set the month of the year to the specified value. | 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
MutableDateTime.setMillis(long) to be rounded. | 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
MutableDateTime.setMillis(long) to be rounded. | public void | setSecondOfDay(int secondOfDay) Set the second of the day to the specified value. | public void | setSecondOfMinute(int secondOfMinute) Set the second of the minute to the specified value. | public void | setTime(long millis) Set the time from milliseconds. | public void | setTime(ReadableInstant instant) Set the time from another instant. | public void | setTime(int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond) Set the time from fields. | public void | setWeekOfWeekyear(int weekOfWeekyear) Set the week of weekyear to the specified value. | public void | setWeekyear(int weekyear) Set the weekyear to the specified value. | public void | setYear(int year) Set the year to the specified value. | 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. | public void | setZoneRetainFields(DateTimeZone newZone) Sets the time zone of the datetime, changing the chronology and millisecond. | public String | toString() Output the date time in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ). | public Property | weekOfWeekyear() Get the week of a week based year property. | public Property | weekyear() Get the year of a week based year property. | public Property | year() Get the year property. | public Property | yearOfCentury() Get the year of century property. | public Property | yearOfEra() Get the year of era property. |
ROUND_NONE | final public static int ROUND_NONE(Code) | | Rounding is disabled
|
MutableDateTime | public MutableDateTime()(Code) | | Constructs an instance set to the current system millisecond time
using ISOChronology in the default time zone.
|
MutableDateTime | public MutableDateTime(DateTimeZone zone)(Code) | | Constructs an instance set to the current system millisecond time
using ISOChronology in the specified time zone.
If the specified time zone is null, the default zone is used.
Parameters: zone - the time zone, null means default zone |
MutableDateTime | public MutableDateTime(Chronology chronology)(Code) | | Constructs an instance set to the current system millisecond time
using the specified chronology.
If the chronology is null, ISOChronology
in the default time zone is used.
Parameters: chronology - the chronology, null means ISOChronology in default zone |
MutableDateTime | public MutableDateTime(long instant)(Code) | | Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using ISOChronology in the default time zone.
Parameters: instant - the milliseconds from 1970-01-01T00:00:00Z |
MutableDateTime | public MutableDateTime(long instant, DateTimeZone zone)(Code) | | Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using ISOChronology in the specified time zone.
If the specified time zone is null, the default zone is used.
Parameters: instant - the milliseconds from 1970-01-01T00:00:00Z Parameters: zone - the time zone, null means default zone |
MutableDateTime | public MutableDateTime(long instant, Chronology chronology)(Code) | | Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z
using the specified chronology.
If the chronology is null, ISOChronology
in the default time zone is used.
Parameters: instant - the milliseconds from 1970-01-01T00:00:00Z Parameters: chronology - the chronology, null means ISOChronology in default zone |
MutableDateTime | public MutableDateTime(Object instant)(Code) | | 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
org.joda.time.convert.ConverterManager ConverterManager and
include ReadableInstant, String, Calendar and Date.
Parameters: instant - the datetime object, null means now throws: IllegalArgumentException - if the instant is invalid |
MutableDateTime | public MutableDateTime(Object instant, DateTimeZone zone)(Code) | | 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
org.joda.time.convert.ConverterManager ConverterManager and
include ReadableInstant, String, Calendar and Date.
Parameters: instant - the datetime object, null means now Parameters: zone - the time zone, null means default time zone throws: IllegalArgumentException - if the instant is invalid |
MutableDateTime | public MutableDateTime(Object instant, Chronology chronology)(Code) | | 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
org.joda.time.convert.ConverterManager ConverterManager and
include ReadableInstant, String, Calendar and Date.
Parameters: instant - the datetime object, null means now Parameters: chronology - the chronology, null means ISOChronology in default zone throws: IllegalArgumentException - if the instant is invalid |
MutableDateTime | public MutableDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code) | | Constructs an instance from datetime field values
using ISOChronology in the default time zone.
Parameters: year - the year Parameters: monthOfYear - the month of the year Parameters: dayOfMonth - the day of the month Parameters: hourOfDay - the hour of the day Parameters: minuteOfHour - the minute of the hour Parameters: secondOfMinute - the second of the minute Parameters: millisOfSecond - the millisecond of the second |
MutableDateTime | public MutableDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, DateTimeZone zone)(Code) | | Constructs an instance from datetime field values
using ISOChronology in the specified time zone.
If the specified time zone is null, the default zone is used.
Parameters: year - the year Parameters: monthOfYear - the month of the year Parameters: dayOfMonth - the day of the month Parameters: hourOfDay - the hour of the day Parameters: minuteOfHour - the minute of the hour Parameters: secondOfMinute - the second of the minute Parameters: millisOfSecond - the millisecond of the second Parameters: zone - the time zone, null means default time zone |
MutableDateTime | public MutableDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond, Chronology chronology)(Code) | | Constructs an instance from datetime field values
using the specified chronology.
If the chronology is null, ISOChronology
in the default time zone is used.
Parameters: year - the year Parameters: monthOfYear - the month of the year Parameters: dayOfMonth - the day of the month Parameters: hourOfDay - the hour of the day Parameters: minuteOfHour - the minute of the hour Parameters: secondOfMinute - the second of the minute Parameters: millisOfSecond - the millisecond of the second Parameters: chronology - the chronology, null means ISOChronology in default zone |
add | public void add(long duration)(Code) | | Add an amount of time to the datetime.
Parameters: duration - the millis to add throws: ArithmeticException - if the result exceeds the capacity of the instant |
add | public void add(ReadableDuration duration)(Code) | | Adds a duration to this instant.
This will typically change the value of most fields.
Parameters: duration - the duration to add, null means add zero throws: ArithmeticException - if the result exceeds the capacity of the instant |
add | public void add(ReadableDuration duration, int scalar)(Code) | | Adds a duration to this instant specifying how many times to add.
This will typically change the value of most fields.
Parameters: duration - the duration to add, null means add zero Parameters: scalar - direction and amount to add, which may be negative throws: ArithmeticException - if the result exceeds the capacity of the instant |
add | public void add(ReadablePeriod period)(Code) | | Adds a period to this instant.
This will typically change the value of most fields.
Parameters: period - the period to add, null means add zero throws: ArithmeticException - if the result exceeds the capacity of the instant |
add | public void add(ReadablePeriod period, int scalar)(Code) | | Adds a period to this instant specifying how many times to add.
This will typically change the value of most fields.
Parameters: period - the period to add, null means add zero Parameters: scalar - direction and amount to add, which may be negative throws: ArithmeticException - if the result exceeds the capacity of the instant |
add | public void add(DurationFieldType type, int amount)(Code) | | Adds to the instant specifying the duration and multiple to add.
Parameters: type - a field type, usually obtained from DateTimeFieldType, not null Parameters: amount - the amount to add of this duration throws: IllegalArgumentException - if the value is null or invalid throws: ArithmeticException - if the result exceeds the capacity of the instant |
addDays | public void addDays(int days)(Code) | | Add a number of days to the date.
Parameters: days - the days to add throws: IllegalArgumentException - if the value is invalid |
addHours | public void addHours(int hours)(Code) | | Add a number of hours to the date.
Parameters: hours - the hours to add throws: IllegalArgumentException - if the value is invalid |
addMillis | public void addMillis(int millis)(Code) | | Add a number of milliseconds to the date. The implementation of this
method differs from the
MutableDateTime.add(long) method in that a
DateTimeField performs the addition.
Parameters: millis - the milliseconds to add throws: IllegalArgumentException - if the value is invalid |
addMinutes | public void addMinutes(int minutes)(Code) | | Add a number of minutes to the date.
Parameters: minutes - the minutes to add throws: IllegalArgumentException - if the value is invalid |
addMonths | public void addMonths(int months)(Code) | | Add a number of months to the date.
Parameters: months - the months to add throws: IllegalArgumentException - if the value is invalid |
addSeconds | public void addSeconds(int seconds)(Code) | | Add a number of seconds to the date.
Parameters: seconds - the seconds to add throws: IllegalArgumentException - if the value is invalid |
addWeeks | public void addWeeks(int weeks)(Code) | | Add a number of weeks to the date.
Parameters: weeks - the weeks to add throws: IllegalArgumentException - if the value is invalid |
addWeekyears | public void addWeekyears(int weekyears)(Code) | | Add a number of weekyears to the date.
Parameters: weekyears - the weekyears to add throws: IllegalArgumentException - if the value is invalid |
addYears | public void addYears(int years)(Code) | | Add a number of years to the date.
Parameters: years - the years to add throws: IllegalArgumentException - if the value is invalid |
centuryOfEra | public Property centuryOfEra()(Code) | | Get the century of era property.
the year of era property |
clone | public Object clone()(Code) | | Clone this object.
a clone of this object. |
copy | public MutableDateTime copy()(Code) | | Clone this object without having to cast the returned object.
a clone of the this object. |
dayOfMonth | public Property dayOfMonth()(Code) | | Get the day of month property.
The values for day of month are defined in
DateTimeConstants .
the day of month property |
dayOfWeek | public Property dayOfWeek()(Code) | | Get the day of week property.
The values for day of week are defined in
DateTimeConstants .
the day of week property |
dayOfYear | public Property dayOfYear()(Code) | | Get the day of year property.
the day of year property |
era | public Property era()(Code) | | Get the era property.
the era property |
getRoundingField | public DateTimeField getRoundingField()(Code) | | Gets the field used for rounding this instant, returning null if rounding
is not enabled.
the rounding field |
getRoundingMode | public int getRoundingMode()(Code) | | Gets the rounding mode for this instant, returning ROUND_NONE if rounding
is not enabled.
the rounding mode constant |
hourOfDay | public Property hourOfDay()(Code) | | Get the hour of day field property
the hour of day property |
millisOfDay | public Property millisOfDay()(Code) | | Get the millis of day property
the millis of day property |
millisOfSecond | public Property millisOfSecond()(Code) | | Get the millis of second property
the millis of second property |
minuteOfDay | public Property minuteOfDay()(Code) | | Get the minute of day property
the minute of day property |
minuteOfHour | public Property minuteOfHour()(Code) | | Get the minute of hour field property
the minute of hour property |
monthOfYear | public Property monthOfYear()(Code) | | Get the month of year property.
the month of year property |
property | public Property property(DateTimeFieldType type)(Code) | | Gets the property object for the specified type, which contains many useful methods.
Parameters: type - the field type to get the chronology for the property object throws: IllegalArgumentException - if the field is null or unsupported since: 1.2 |
secondOfDay | public Property secondOfDay()(Code) | | Get the second of day property
the second of day property |
secondOfMinute | public Property secondOfMinute()(Code) | | Get the second of minute field property
the second of minute property |
set | public void set(DateTimeFieldType type, int value)(Code) | | Sets the value of one of the fields of the instant, such as hourOfDay.
Parameters: type - a field type, usually obtained from DateTimeFieldType, not null Parameters: value - the value to set the field to throws: IllegalArgumentException - if the value is null or invalid |
setChronology | public void setChronology(Chronology chronology)(Code) | | Set the chronology of the datetime.
All changes to the chronology occur via this method.
Parameters: chronology - the chronology to use, null means ISOChronology in default zone |
setDate | public void setDate(long instant)(Code) | | Set the date from milliseconds.
The time part of this object will be unaffected.
Parameters: instant - an instant to copy the date from, time part ignored throws: IllegalArgumentException - if the value is invalid |
setDate | public void setDate(ReadableInstant instant)(Code) | | Set the date from another instant.
The time part of this object will be unaffected.
Parameters: instant - an instant to copy the date from, time part ignored throws: IllegalArgumentException - if the object is invalid |
setDate | public void setDate(int year, int monthOfYear, int dayOfMonth)(Code) | | Set the date from fields.
The time part of this object will be unaffected.
Parameters: year - the year Parameters: monthOfYear - the month of the year Parameters: dayOfMonth - the day of the month throws: IllegalArgumentException - if the value is invalid |
setDateTime | public void setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code) | | Set the date and time from fields.
Parameters: year - the year Parameters: monthOfYear - the month of the year Parameters: dayOfMonth - the day of the month Parameters: hourOfDay - the hour of the day Parameters: minuteOfHour - the minute of the hour Parameters: secondOfMinute - the second of the minute Parameters: millisOfSecond - the millisecond of the second throws: IllegalArgumentException - if the value is invalid |
setDayOfMonth | public void setDayOfMonth(int dayOfMonth)(Code) | | Set the day of the month to the specified value.
Parameters: dayOfMonth - the day of the month throws: IllegalArgumentException - if the value is invalid |
setDayOfWeek | public void setDayOfWeek(int dayOfWeek)(Code) | | Set the day of week to the specified value.
Parameters: dayOfWeek - the day of the week throws: IllegalArgumentException - if the value is invalid |
setDayOfYear | public void setDayOfYear(int dayOfYear)(Code) | | Set the day of year to the specified value.
Parameters: dayOfYear - the day of the year throws: IllegalArgumentException - if the value is invalid |
setHourOfDay | public void setHourOfDay(int hourOfDay)(Code) | | Set the hour of the day to the specified value.
Parameters: hourOfDay - the hour of day throws: IllegalArgumentException - if the value is invalid |
setMillis | public void setMillis(long instant)(Code) | | Set the milliseconds of the datetime.
All changes to the millisecond field occurs via this method.
Parameters: instant - the milliseconds since 1970-01-01T00:00:00Z to set thedatetime to |
setMillis | public void setMillis(ReadableInstant instant)(Code) | | Sets the millisecond instant of this instant from another.
This method does not change the chronology of this instant, just the
millisecond instant.
Parameters: instant - the instant to use, null means now |
setMillisOfDay | public void setMillisOfDay(int millisOfDay)(Code) | | Set the millis of the day to the specified value.
Parameters: millisOfDay - the millis of day throws: IllegalArgumentException - if the value is invalid |
setMillisOfSecond | public void setMillisOfSecond(int millisOfSecond)(Code) | | Set the millis of the second to the specified value.
Parameters: millisOfSecond - the millis of second throws: IllegalArgumentException - if the value is invalid |
setMinuteOfDay | public void setMinuteOfDay(int minuteOfDay)(Code) | | Set the minute of the day to the specified value.
Parameters: minuteOfDay - the minute of day throws: IllegalArgumentException - if the value is invalid |
setMinuteOfHour | public void setMinuteOfHour(int minuteOfHour)(Code) | | Set the minute of the hour to the specified value.
Parameters: minuteOfHour - the minute of hour throws: IllegalArgumentException - if the value is invalid |
setMonthOfYear | public void setMonthOfYear(int monthOfYear)(Code) | | Set the month of the year to the specified value.
Parameters: monthOfYear - the month of the year throws: IllegalArgumentException - if the value is invalid |
setRounding | public void setRounding(DateTimeField field)(Code) | | 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
MutableDateTime.setMillis(long) 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.
Parameters: field - rounding field or null to disable |
setRounding | public void setRounding(DateTimeField field, int mode)(Code) | | 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
MutableDateTime.setMillis(long) 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.
Parameters: field - rounding field or null to disable Parameters: mode - rounding mode or ROUND_NONE to disable throws: IllegalArgumentException - if mode is unknown, no exception if field is null |
setSecondOfDay | public void setSecondOfDay(int secondOfDay)(Code) | | Set the second of the day to the specified value.
Parameters: secondOfDay - the second of day throws: IllegalArgumentException - if the value is invalid |
setSecondOfMinute | public void setSecondOfMinute(int secondOfMinute)(Code) | | Set the second of the minute to the specified value.
Parameters: secondOfMinute - the second of minute throws: IllegalArgumentException - if the value is invalid |
setTime | public void setTime(long millis)(Code) | | Set the time from milliseconds.
The date part of this object will be unaffected.
Parameters: millis - an instant to copy the time from, date part ignored throws: IllegalArgumentException - if the value is invalid |
setTime | public void setTime(ReadableInstant instant)(Code) | | Set the time from another instant.
The date part of this object will be unaffected.
Parameters: instant - an instant to copy the time from, date part ignored throws: IllegalArgumentException - if the object is invalid |
setTime | public void setTime(int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond)(Code) | | Set the time from fields.
The date part of this object will be unaffected.
Parameters: hour - the hour Parameters: minuteOfHour - the minute of the hour Parameters: secondOfMinute - the second of the minute Parameters: millisOfSecond - the millisecond of the second throws: IllegalArgumentException - if the value is invalid |
setWeekOfWeekyear | public void setWeekOfWeekyear(int weekOfWeekyear)(Code) | | Set the week of weekyear to the specified value.
Parameters: weekOfWeekyear - the week of the weekyear throws: IllegalArgumentException - if the value is invalid |
setWeekyear | public void setWeekyear(int weekyear)(Code) | | Set the weekyear to the specified value.
Parameters: weekyear - the weekyear throws: IllegalArgumentException - if the value is invalid |
setYear | public void setYear(int year)(Code) | | Set the year to the specified value.
Parameters: year - the year throws: IllegalArgumentException - if the value is invalid |
setZone | public void setZone(DateTimeZone newZone)(Code) | | 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.
Parameters: newZone - the time zone to use, null means default zone See Also: MutableDateTime.setZoneRetainFields |
setZoneRetainFields | public void setZoneRetainFields(DateTimeZone newZone)(Code) | | 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.
Parameters: newZone - the time zone to use, null means default zone See Also: MutableDateTime.setZone |
toString | public String toString()(Code) | | Output the date time in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZ).
ISO8601 time formatted string. |
weekOfWeekyear | public Property weekOfWeekyear()(Code) | | Get the week of a week based year property.
the week of a week based year property |
weekyear | public Property weekyear()(Code) | | Get the year of a week based year property.
the year of a week based year property |
year | public Property year()(Code) | | Get the year property.
the year property |
yearOfCentury | public Property yearOfCentury()(Code) | | Get the year of century property.
the year of era property |
yearOfEra | public Property yearOfEra()(Code) | | Get the year of era property.
the year of era property |
|
|