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
-
final class GJMonthOfYearDateTimeField extends BasicMonthOfYearDateTimeField
Provides time calculations for the month of the year component of time.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
Serialization version
-
Constructor Summary
Constructors Constructor Description GJMonthOfYearDateTimeField(BasicChronology chronology)
Restricted constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
convertText(java.lang.String text, java.util.Locale locale)
Convert the specified text and locale into a value.java.lang.String
getAsShortText(int fieldValue, java.util.Locale locale)
Get the human-readable, short text value of this field from the field value.java.lang.String
getAsText(int fieldValue, java.util.Locale locale)
Get the human-readable, text value of this field from the field value.int
getMaximumShortTextLength(java.util.Locale locale)
Get the maximum short text value for this field.int
getMaximumTextLength(java.util.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, set
-
Methods inherited from class org.joda.time.field.ImpreciseDateTimeField
getDifference, getDurationField, getDurationUnitMillis
-
Methods 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, toString
-
Methods inherited from class org.joda.time.DateTimeField
setExtended
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serialization version- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GJMonthOfYearDateTimeField
GJMonthOfYearDateTimeField(BasicChronology chronology)
Restricted constructor
-
-
Method Detail
-
getAsText
public java.lang.String getAsText(int fieldValue, java.util.Locale locale)
Description copied from class:BaseDateTimeField
Get 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:
getAsText
in 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
public java.lang.String getAsShortText(int fieldValue, java.util.Locale locale)
Description copied from class:BaseDateTimeField
Get 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:
getAsShortText
in 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
protected int convertText(java.lang.String text, java.util.Locale locale)
Description copied from class:BaseDateTimeField
Convert the specified text and locale into a value.- Overrides:
convertText
in classBaseDateTimeField
- Parameters:
text
- the text to convertlocale
- the locale to convert using- Returns:
- the value extracted from the text
-
getMaximumTextLength
public int getMaximumTextLength(java.util.Locale locale)
Description copied from class:BaseDateTimeField
Get the maximum text value for this field. The default implementation returns the equivalent of Integer.toString(getMaximumValue()).length().- Overrides:
getMaximumTextLength
in classBaseDateTimeField
- Parameters:
locale
- the locale to use for selecting a text symbol- Returns:
- the maximum text length
-
getMaximumShortTextLength
public int getMaximumShortTextLength(java.util.Locale locale)
Description copied from class:BaseDateTimeField
Get the maximum short text value for this field. The default implementation returns getMaximumTextLength().- Overrides:
getMaximumShortTextLength
in classBaseDateTimeField
- Parameters:
locale
- the locale to use for selecting a text symbol- Returns:
- the maximum short text length
-
-