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
-
final class GJDayOfWeekDateTimeField extends PreciseDurationDateTimeField
GJDayOfWeekDateTimeField provides time calculations for the day of the week component of time.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description private BasicChronology
iChronology
private static long
serialVersionUID
Serialization version
-
Constructor Summary
Constructors Constructor Description GJDayOfWeekDateTimeField(BasicChronology chronology, DurationField days)
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.int
get(long instant)
Get the value of the specified time instant.java.lang.String
getAsShortText(int fieldValue, java.util.Locale locale)
Get the abbreviated textual value of the specified time instant.java.lang.String
getAsText(int fieldValue, java.util.Locale locale)
Get the textual value of the specified time instant.int
getMaximumShortTextLength(java.util.Locale locale)
Get the maximum length of the abbreviated text returned by this field.int
getMaximumTextLength(java.util.Locale locale)
Get the maximum length of the text returned by this field.int
getMaximumValue()
Get the maximum value that this field can have.int
getMinimumValue()
Get the minimum value that this field can have.DurationField
getRangeDurationField()
Returns the range duration of this field.private java.lang.Object
readResolve()
Serialization singleton-
Methods inherited from class org.joda.time.field.PreciseDurationDateTimeField
getDurationField, getMaximumValueForSet, getUnitMillis, isLenient, remainder, roundCeiling, roundFloor, set
-
Methods 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, 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
-
iChronology
private final BasicChronology iChronology
-
-
Constructor Detail
-
GJDayOfWeekDateTimeField
GJDayOfWeekDateTimeField(BasicChronology chronology, DurationField days)
Restricted constructor.
-
-
Method Detail
-
get
public int get(long instant)
Get the value of the specified time instant.- Specified by:
get
in classBaseDateTimeField
- Parameters:
instant
- the time instant in millis to query- Returns:
- the day of the week extracted from the input
-
getAsText
public java.lang.String getAsText(int fieldValue, java.util.Locale locale)
Get the textual value of the specified time instant.- Overrides:
getAsText
in classBaseDateTimeField
- Parameters:
fieldValue
- the field value to querylocale
- the locale to use- Returns:
- the day of the week, such as 'Monday'
-
getAsShortText
public java.lang.String getAsShortText(int fieldValue, java.util.Locale locale)
Get the abbreviated textual value of the specified time instant.- Overrides:
getAsShortText
in classBaseDateTimeField
- Parameters:
fieldValue
- the field value to querylocale
- the locale to use- Returns:
- the day of the week, such as 'Mon'
-
convertText
protected int convertText(java.lang.String text, java.util.Locale locale)
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
- Throws:
java.lang.IllegalArgumentException
- if the text is invalid
-
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()
Get the minimum value that this field can have.- Overrides:
getMinimumValue
in classPreciseDurationDateTimeField
- Returns:
- the field's minimum value
-
getMaximumValue
public int getMaximumValue()
Get the maximum value that this field can have.- Specified by:
getMaximumValue
in classBaseDateTimeField
- Returns:
- the field's maximum value
-
getMaximumTextLength
public int getMaximumTextLength(java.util.Locale locale)
Get the maximum length of the text returned by this field.- Overrides:
getMaximumTextLength
in classBaseDateTimeField
- Parameters:
locale
- the locale to use- Returns:
- the maximum textual length
-
getMaximumShortTextLength
public int getMaximumShortTextLength(java.util.Locale locale)
Get the maximum length of the abbreviated text returned by this field.- Overrides:
getMaximumShortTextLength
in classBaseDateTimeField
- Parameters:
locale
- the locale to use- Returns:
- the maximum abbreviated textual length
-
readResolve
private java.lang.Object readResolve()
Serialization singleton
-
-