|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Writable interface for an instant in the datetime continuum.
This interface expresses the datetime as milliseconds from 1970-01-01T00:00:00Z.
| Method Summary | |
void |
add(DateTimeField field,
int value)
Add to the value of one of the fields of a datetime. |
void |
add(java.lang.Object object)
Add an amount of time, either a ReadableDuration or Long (millis). |
void |
addMillis(long millis)
Add a number of millis to the value. |
void |
addWrapped(DateTimeField field,
int value)
Add to the value of one of the fields of a datetime, wrapping within that field. |
void |
set(DateTimeField field,
int value)
Set the value of one of the fields of a datetime. |
void |
setMillis(long millis)
Set the value as the number of miliseconds since the epoch, 1970-01-01T00:00:00Z. |
void |
setMillis(java.lang.Object obj)
Set the value from Date, Calendar, DateTime etc. |
| Methods inherited from interface org.joda.time.ReadableInstant |
compareTo, equals, get, getChronology, getDateTimeZone, getMillis, hashCode, isAfter, isBefore, isEqual, toCopy, toCopy, toInstant, toString |
| Method Detail |
public void setMillis(long millis)
public void setMillis(java.lang.Object obj)
public void add(java.lang.Object object)
If the resulting value is too large for the implementation, an exception is thrown.
object - an object evaluating to an a period of time to
add.public void addMillis(long millis)
If the resulting value is too large for millis, seconds will change and so on unless it is too large for the implementation, when an exception is thrown.
millis - the millis to add
public void set(DateTimeField field,
int value)
DateTimeField instances are generally obtained from a Chronology subclass.
However, an application can create its own DateTimeField to manipulate the
date time millis in new ways.
field - a DateTimeField instance, usually obtained from a Chronologyvalue - the value of that field for the millis set in the implementation
public void add(DateTimeField field,
int value)
DateTimeField instances are generally obtained from a Chronology subclass.
However, an application can create its own DateTimeField to manipulate the
date time millis in new ways.
field - a DateTimeField instance, usually obtained from a Chronologyvalue - the value of that field for the millis set in the implementation
public void addWrapped(DateTimeField field,
int value)
For example, 2002-03-01 add 14 months gives 2003-05-01. But 2002-03-01 add wrapped
14 months gives 2002-05-01. This is similar to the roll method on Calendar.
DateTimeField instances are generally obtained from a Chronology subclass.
However, an application can create its own DateTimeField to manipulate the
date time millis in new ways.
field - a DateTimeField instance, usually obtained from a Chronologyvalue - the value of that field for the millis set in the implementation
|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||