public class GMonthDay extends Date
The format is defined by W3C XML Schema Recommendation and ISO8601 i.e --MM-DD(Z|(+|-)hh:mm)
DATE_FORMATEQUALS, GREATER_THAN, INDETERMINATE, LESS_THAN, WRONGLY_PLACED| Constructor and Description |
|---|
GMonthDay()
public only for the generated source code
|
GMonthDay(int month,
int day)
Instantiates a new gMonthDay given the value
of the month and the value of the day.
|
GMonthDay(short[] values)
Constructs a XML Schema GMonthDay instance given all the values of
the different fields.
|
GMonthDay(short month,
short day)
Instantiates a new gMonthDay given the value
of the month and the value of the day.
|
GMonthDay(java.lang.String gmonthDay)
Construct a GMonthDay from a string value
|
| Modifier and Type | Method and Description |
|---|---|
short |
getCentury() |
short[] |
getValues()
Returns an array of short with all the fields that describe
this gMonthDay type.
|
short |
getYear() |
static java.lang.Object |
parse(java.lang.String str)
parse a String and convert it into an java.lang.Object
|
static GMonthDay |
parseGMonthDay(java.lang.String str)
parse a String and convert it into a gMonthDay.
|
void |
setCentury(short century)
set the century field
|
void |
setNegative()
set the negative field to true
|
void |
setValues(short[] values)
Sets all the fields by reading the values in an array
|
void |
setYear(short year)
set the Year field
Note: 0000 is not allowed
|
java.util.Date |
toDate()
converts this gMonthDay into a local java Date.
|
java.lang.String |
toString()
convert this gMonthDay to a string
The format is defined by W3C XML Schema recommendation and ISO8601
i.e --MM-DD(Z|(+|-)hh:mm)
|
getHour, getMilli, getMinute, getSeconds, parseDate, setHour, setMilliSecond, setMinute, setSecond, toLongaddDuration, compareTo, equal, equals, getDay, getMonth, getZoneHour, getZoneMinute, hashCode, isLeap, isNegative, isUTC, isZoneNegative, normalize, setDay, setMonth, setSecond, setUTC, setZone, setZoneHour, setZoneMinute, setZoneNegative, toCalendarpublic GMonthDay()
public GMonthDay(short month,
short day)
month - the month valueday - the day valuepublic GMonthDay(int month,
int day)
month - the month valueday - the day valuepublic GMonthDay(short[] values)
values - an array of shorts that represent the different fields of Time.public GMonthDay(java.lang.String gmonthDay)
throws java.text.ParseException
gmonthDay - the string representation of the GMonthDay to instantiatejava.text.ParseExceptionpublic void setValues(short[] values)
if a Time Zone is specificied it has to be set by using
setZone.
public short[] getValues()
Note:the time zone is not included.
public java.util.Date toDate()
public java.lang.String toString()
public static java.lang.Object parse(java.lang.String str)
throws java.text.ParseException
str - the string to parsejava.text.ParseException - a parse exception is thrown if the string to parse
does not follow the rigth format (see the description
of this class)public static GMonthDay parseGMonthDay(java.lang.String str) throws java.text.ParseException
str - the string to parsejava.text.ParseException - a parse exception is thrown if the string to parse
does not follow the rigth format (see the description
of this class)public short getCentury()
getCentury in class DateTimeBasepublic void setCentury(short century)
DateTimeBasesetCentury in class DateTimeBasecentury - the value to set uppublic short getYear()
getYear in class DateTimeBasepublic void setYear(short year)
DateTimeBasesetYear in class DateTimeBaseyear - year to set uppublic void setNegative()
DateTimeBasesetNegative in class DateTimeBaseIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com