| org.joda.time.field.ImpreciseDateTimeField org.joda.time.chrono.BasicMonthOfYearDateTimeField
All known Subclasses: org.joda.time.chrono.GJMonthOfYearDateTimeField,
BasicMonthOfYearDateTimeField | class BasicMonthOfYearDateTimeField extends ImpreciseDateTimeField (Code) | | Provides time calculations for the month of the year component of time.
author: Guy Allard author: Stephen Colebourne author: Brian S O'Neill since: 1.2, refactored from GJMonthOfYearDateTimeField |
Method Summary | |
public long | add(long instant, int months) Add the specified month to the specified time instant.
The amount added may be negative.
If the new month has less total days than the specified
day of the month, this value is coerced to the nearest
sane value. | public long | add(long instant, long months) | public int[] | add(ReadablePartial partial, int fieldIndex, int[] values, int valueToAdd) | public long | addWrapField(long instant, int months) Add to the Month component of the specified time instant
wrapping around within that component if necessary.
See Also: org.joda.time.DateTimeField.addWrapField Parameters: instant - the time instant in millis to update. Parameters: months - the months to add (can be negative). | public int | get(long instant) Get the Month component of the specified time instant.
See Also: org.joda.time.DateTimeField.get(long) See Also: org.joda.time.ReadableDateTime.getMonthOfYear Parameters: instant - the time instant in millis to query. | public long | getDifferenceAsLong(long minuendInstant, long subtrahendInstant) | public int | getLeapAmount(long instant) | public DurationField | getLeapDurationField() | public int | getMaximumValue() | public int | getMinimumValue() | public DurationField | getRangeDurationField() | public boolean | isLeap(long instant) | public boolean | isLenient() | public long | remainder(long instant) | public long | roundFloor(long instant) | public long | set(long instant, int month) Set the Month component of the specified time instant.
If the new month has less total days than the specified
day of the month, this value is coerced to the nearest
sane value. |
BasicMonthOfYearDateTimeField | BasicMonthOfYearDateTimeField(BasicChronology chronology, int leapMonth)(Code) | | Restricted constructor.
Parameters: leapMonth - the month of year that leaps |
add | public long add(long instant, int months)(Code) | | Add the specified month to the specified time instant.
The amount added may be negative.
If the new month has less total days than the specified
day of the month, this value is coerced to the nearest
sane value. e.g.
07-31 - (1 month) = 06-30
03-31 - (1 month) = 02-28 or 02-29 depending
See Also: org.joda.time.DateTimeField.add See Also: org.joda.time.ReadWritableDateTime.addMonths(int) Parameters: instant - the time instant in millis to update. Parameters: months - the months to add (can be negative). the updated time instant. |
add | public long add(long instant, long months)(Code) | | |
addWrapField | public long addWrapField(long instant, int months)(Code) | | Add to the Month component of the specified time instant
wrapping around within that component if necessary.
See Also: org.joda.time.DateTimeField.addWrapField Parameters: instant - the time instant in millis to update. Parameters: months - the months to add (can be negative). the updated time instant. |
getDifferenceAsLong | public long getDifferenceAsLong(long minuendInstant, long subtrahendInstant)(Code) | | |
getLeapAmount | public int getLeapAmount(long instant)(Code) | | |
getMaximumValue | public int getMaximumValue()(Code) | | |
getMinimumValue | public int getMinimumValue()(Code) | | |
isLeap | public boolean isLeap(long instant)(Code) | | |
isLenient | public boolean isLenient()(Code) | | |
remainder | public long remainder(long instant)(Code) | | |
roundFloor | public long roundFloor(long instant)(Code) | | |
set | public long set(long instant, int month)(Code) | | Set the Month component of the specified time instant.
If the new month has less total days than the specified
day of the month, this value is coerced to the nearest
sane value. e.g.
07-31 to month 6 = 06-30
03-31 to month 2 = 02-28 or 02-29 depending
Parameters: instant - the time instant in millis to update. Parameters: month - the month (1,12) to update the time to. the updated time instant. throws: IllegalArgumentException - if month is invalid |
|
|