Package org.joda.time.chrono
Class GJDayOfWeekDateTimeField
java.lang.Object
org.joda.time.DateTimeField
org.joda.time.field.BaseDateTimeField
org.joda.time.field.PreciseDurationDateTimeField
org.joda.time.chrono.GJDayOfWeekDateTimeField
GJDayOfWeekDateTimeField provides time calculations for the
day of the week component of time.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BasicChronologyprivate static final longSerialization version -
Constructor Summary
ConstructorsConstructorDescriptionGJDayOfWeekDateTimeField(BasicChronology chronology, DurationField days) Restricted constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected intconvertText(String text, Locale locale) Convert the specified text and locale into a value.intget(long instant) Get the value of the specified time instant.getAsShortText(int fieldValue, Locale locale) Get the abbreviated textual value of the specified time instant.Get the textual value of the specified time instant.intgetMaximumShortTextLength(Locale locale) Get the maximum length of the abbreviated text returned by this field.intgetMaximumTextLength(Locale locale) Get the maximum length of the text returned by this field.intGet the maximum value that this field can have.intGet the minimum value that this field can have.Returns the range duration of this field.private ObjectSerialization singletonMethods inherited from class org.joda.time.field.PreciseDurationDateTimeField
getDurationField, getMaximumValueForSet, getUnitMillis, isLenient, remainder, roundCeiling, roundFloor, setMethods inherited from class org.joda.time.field.BaseDateTimeField
add, add, add, addWrapField, addWrapField, addWrapPartial, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getDifference, getDifferenceAsLong, getLeapAmount, getLeapDurationField, getMaximumValue, getMaximumValue, getMaximumValue, getMinimumValue, getMinimumValue, getMinimumValue, getName, getType, isLeap, isSupported, roundHalfCeiling, roundHalfEven, roundHalfFloor, set, set, set, set, toStringMethods inherited from class org.joda.time.DateTimeField
setExtended
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version- See Also:
-
iChronology
-
-
Constructor Details
-
GJDayOfWeekDateTimeField
GJDayOfWeekDateTimeField(BasicChronology chronology, DurationField days) Restricted constructor.
-
-
Method Details
-
get
public int get(long instant) Get the value of the specified time instant.- Specified by:
getin classBaseDateTimeField- Parameters:
instant- the time instant in millis to query- Returns:
- the day of the week extracted from the input
-
getAsText
Get the textual value of the specified time instant.- Overrides:
getAsTextin classBaseDateTimeField- Parameters:
fieldValue- the field value to querylocale- the locale to use- Returns:
- the day of the week, such as 'Monday'
-
getAsShortText
Get the abbreviated textual value of the specified time instant.- Overrides:
getAsShortTextin classBaseDateTimeField- Parameters:
fieldValue- the field value to querylocale- the locale to use- Returns:
- the day of the week, such as 'Mon'
-
convertText
Convert the specified text and locale into a value.- Overrides:
convertTextin classBaseDateTimeField- Parameters:
text- the text to convertlocale- the locale to convert using- Returns:
- the value extracted from the text
- Throws:
IllegalArgumentException- if the text is invalid
-
getRangeDurationField
Description copied from class:BaseDateTimeFieldReturns the range duration of this field. For example, if this field represents "hour of day", then the range duration is a day.- Specified by:
getRangeDurationFieldin classBaseDateTimeField- Returns:
- the range duration of this field, or null if field has no range
-
getMinimumValue
public int getMinimumValue()Get the minimum value that this field can have.- Overrides:
getMinimumValuein classPreciseDurationDateTimeField- Returns:
- the field's minimum value
-
getMaximumValue
public int getMaximumValue()Get the maximum value that this field can have.- Specified by:
getMaximumValuein classBaseDateTimeField- Returns:
- the field's maximum value
-
getMaximumTextLength
Get the maximum length of the text returned by this field.- Overrides:
getMaximumTextLengthin classBaseDateTimeField- Parameters:
locale- the locale to use- Returns:
- the maximum textual length
-
getMaximumShortTextLength
Get the maximum length of the abbreviated text returned by this field.- Overrides:
getMaximumShortTextLengthin classBaseDateTimeField- Parameters:
locale- the locale to use- Returns:
- the maximum abbreviated textual length
-
readResolve
Serialization singleton
-