Package org.joda.time.chrono
Class GJMonthOfYearDateTimeField
java.lang.Object
org.joda.time.DateTimeField
org.joda.time.field.BaseDateTimeField
org.joda.time.field.ImpreciseDateTimeField
org.joda.time.chrono.BasicMonthOfYearDateTimeField
org.joda.time.chrono.GJMonthOfYearDateTimeField
Provides time calculations for the month of the year component of time.
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longSerialization version -
Constructor Summary
ConstructorsConstructorDescriptionGJMonthOfYearDateTimeField(BasicChronology chronology) Restricted constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected intconvertText(String text, Locale locale) Convert the specified text and locale into a value.getAsShortText(int fieldValue, Locale locale) Get the human-readable, short text value of this field from the field value.Get the human-readable, text value of this field from the field value.intgetMaximumShortTextLength(Locale locale) Get the maximum short text value for this field.intgetMaximumTextLength(Locale locale) Get the maximum text value for this field.Methods inherited from class org.joda.time.chrono.BasicMonthOfYearDateTimeField
add, add, add, addWrapField, get, getDifferenceAsLong, getLeapAmount, getLeapDurationField, getMaximumValue, getMinimumValue, getRangeDurationField, isLeap, isLenient, remainder, roundFloor, setMethods inherited from class org.joda.time.field.ImpreciseDateTimeField
getDifference, getDurationField, getDurationUnitMillisMethods inherited from class org.joda.time.field.BaseDateTimeField
addWrapField, addWrapPartial, getAsShortText, getAsShortText, getAsShortText, getAsShortText, getAsText, getAsText, getAsText, getAsText, getMaximumValue, getMaximumValue, getMaximumValue, getMinimumValue, getMinimumValue, getMinimumValue, getName, getType, isSupported, roundCeiling, 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:
-
-
Constructor Details
-
GJMonthOfYearDateTimeField
GJMonthOfYearDateTimeField(BasicChronology chronology) Restricted constructor
-
-
Method Details
-
getAsText
Description copied from class:BaseDateTimeFieldGet the human-readable, text value of this field from the field value. If the specified locale is null, the default locale is used.The default implementation returns Integer.toString(get(instant)).
Note: subclasses that override this method should also override getMaximumTextLength.
- Overrides:
getAsTextin classBaseDateTimeField- Parameters:
fieldValue- the numeric value to convert to textlocale- the locale to use for selecting a text symbol, null for default- Returns:
- the text value of the field
-
getAsShortText
Description copied from class:BaseDateTimeFieldGet the human-readable, short text value of this field from the field value. If the specified locale is null, the default locale is used.The default implementation returns getAsText(fieldValue, locale).
Note: subclasses that override this method should also override getMaximumShortTextLength.
- Overrides:
getAsShortTextin classBaseDateTimeField- Parameters:
fieldValue- the numeric value to convert to textlocale- the locale to use for selecting a text symbol, null for default- Returns:
- the text value of the field
-
convertText
Description copied from class:BaseDateTimeFieldConvert 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
-
getMaximumTextLength
Description copied from class:BaseDateTimeFieldGet the maximum text value for this field. The default implementation returns the equivalent of Integer.toString(getMaximumValue()).length().- Overrides:
getMaximumTextLengthin classBaseDateTimeField- Parameters:
locale- the locale to use for selecting a text symbol- Returns:
- the maximum text length
-
getMaximumShortTextLength
Description copied from class:BaseDateTimeFieldGet the maximum short text value for this field. The default implementation returns getMaximumTextLength().- Overrides:
getMaximumShortTextLengthin classBaseDateTimeField- Parameters:
locale- the locale to use for selecting a text symbol- Returns:
- the maximum short text length
-