Package org.joda.time.chrono
Class BasicDayOfMonthDateTimeField
- java.lang.Object
-
- org.joda.time.DateTimeField
-
- org.joda.time.field.BaseDateTimeField
-
- org.joda.time.field.PreciseDurationDateTimeField
-
- org.joda.time.chrono.BasicDayOfMonthDateTimeField
-
final class BasicDayOfMonthDateTimeField extends PreciseDurationDateTimeField
Provides time calculations for the day of the month component of time.- Since:
- 1.1, refactored from GJDayOfMonthDateTimeField
-
-
Field Summary
Fields Modifier and Type Field Description private BasicChronology
iChronology
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description BasicDayOfMonthDateTimeField(BasicChronology chronology, DurationField days)
Restricted constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
get(long instant)
Get the value of this field from the milliseconds.int
getMaximumValue()
Get the maximum allowable value for this field.int
getMaximumValue(long instant)
Get the maximum value for this field evaluated at the specified time.int
getMaximumValue(ReadablePartial partial)
Get the maximum value for this field evaluated at the specified instant.int
getMaximumValue(ReadablePartial partial, int[] values)
Get the maximum value for this field using the partial instant and the specified values.protected int
getMaximumValueForSet(long instant, int value)
Called by the set method to get the maximum allowed value.int
getMinimumValue()
Get the minimum value for the field.DurationField
getRangeDurationField()
Returns the range duration of this field.boolean
isLeap(long instant)
Returns whether this field is 'leap' for the specified instant.private java.lang.Object
readResolve()
Serialization singleton-
Methods inherited from class org.joda.time.field.PreciseDurationDateTimeField
getDurationField, getUnitMillis, isLenient, remainder, roundCeiling, roundFloor, set
-
Methods inherited from class org.joda.time.field.BaseDateTimeField
add, add, add, addWrapField, addWrapField, addWrapPartial, convertText, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getAsText, getDifference, getDifferenceAsLong, getLeapAmount, getLeapDurationField, getMaximumShortTextLength, getMaximumTextLength, getMinimumValue, getMinimumValue, getMinimumValue, getName, getType, isSupported, roundHalfCeiling, roundHalfEven, roundHalfFloor, set, set, set, set, toString
-
Methods inherited from class org.joda.time.DateTimeField
setExtended
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
iChronology
private final BasicChronology iChronology
-
-
Constructor Detail
-
BasicDayOfMonthDateTimeField
BasicDayOfMonthDateTimeField(BasicChronology chronology, DurationField days)
Restricted constructor.
-
-
Method Detail
-
get
public int get(long instant)
Description copied from class:BaseDateTimeField
Get the value of this field from the milliseconds.- Specified by:
get
in classBaseDateTimeField
- Parameters:
instant
- the milliseconds from 1970-01-01T00:00:00Z to query- Returns:
- the value of the field, in the units of the field
-
getRangeDurationField
public DurationField getRangeDurationField()
Description copied from class:BaseDateTimeField
Returns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day.- Specified by:
getRangeDurationField
in classBaseDateTimeField
- Returns:
- the range duration of this field, or null if field has no range
-
getMinimumValue
public int getMinimumValue()
Description copied from class:PreciseDurationDateTimeField
Get the minimum value for the field.- Overrides:
getMinimumValue
in classPreciseDurationDateTimeField
- Returns:
- the minimum value
-
getMaximumValue
public int getMaximumValue()
Description copied from class:BaseDateTimeField
Get the maximum allowable value for this field.- Specified by:
getMaximumValue
in classBaseDateTimeField
- Returns:
- the maximum valid value for this field, in the units of the field
-
getMaximumValue
public int getMaximumValue(long instant)
Description copied from class:BaseDateTimeField
Get the maximum value for this field evaluated at the specified time.This implementation returns the same as
BaseDateTimeField.getMaximumValue()
.- Overrides:
getMaximumValue
in classBaseDateTimeField
- Parameters:
instant
- the milliseconds from 1970-01-01T00:00:00Z to query- Returns:
- the maximum value for this field, in the units of the field
-
getMaximumValue
public int getMaximumValue(ReadablePartial partial)
Description copied from class:BaseDateTimeField
Get the maximum value for this field evaluated at the specified instant.This implementation returns the same as
BaseDateTimeField.getMaximumValue()
.- Overrides:
getMaximumValue
in classBaseDateTimeField
- Parameters:
partial
- the partial instant to query- Returns:
- the maximum value for this field, in the units of the field
-
getMaximumValue
public int getMaximumValue(ReadablePartial partial, int[] values)
Description copied from class:BaseDateTimeField
Get the maximum value for this field using the partial instant and the specified values.This implementation returns the same as
BaseDateTimeField.getMaximumValue(ReadablePartial)
.- Overrides:
getMaximumValue
in classBaseDateTimeField
- Parameters:
partial
- the partial instant to queryvalues
- the values to use- Returns:
- the maximum value for this field, in the units of the field
-
getMaximumValueForSet
protected int getMaximumValueForSet(long instant, int value)
Description copied from class:PreciseDurationDateTimeField
Called by the set method to get the maximum allowed value. By default, returns getMaximumValue(instant). Override to provide a faster implementation.- Overrides:
getMaximumValueForSet
in classPreciseDurationDateTimeField
-
isLeap
public boolean isLeap(long instant)
Description copied from class:BaseDateTimeField
Returns whether this field is 'leap' for the specified instant.For example, a leap year would return true, a non leap year would return false.
This implementation returns false.
- Overrides:
isLeap
in classBaseDateTimeField
- Parameters:
instant
- the instant to check for leap status- Returns:
- true if the field is 'leap'
-
readResolve
private java.lang.Object readResolve()
Serialization singleton
-
-