Describe an XML schema gMonth type.
The format is defined by W3C XML Schema Recommendation and ISO8601
i.e
--MM--(Z|(+|-)hh:mm)
getValues
public short[] getValues()
Returns an array of short with all the fields that describe
this gDay type.
Note:the time zone is not included.
- getValues in interface DateTimeBase
- an array of short with all the fields that describe
this Date type.
parse
public static Object parse(String str)
throws ParseException
parse a String and convert it into an java.lang.Object
str
- the string to parse
- an Object represented by the string
parseGMonth
public static GMonth parseGMonth(String str)
throws ParseException
parse a String and convert it into a GMonth.
str
- the string to parse
- the Date represented by the string
setCentury
public void setCentury(short century)
Set the century field. Note: year 0000 is not allowed.
- setCentury in interface DateTimeBase
century
- the value to set
setDay
public void setDay(short month)
Sets the Day Field. Note: This field is validated before the assignment
is done.
- setDay in interface DateTimeBase
setHour
public void setHour(short hour)
Sets the hour field for this date/time type.
- setHour in interface DateTimeBase
setMilliSecond
public void setMilliSecond(short millisecond)
Sets the millisecond field for this date/time type.
- setMilliSecond in interface DateTimeBase
millisecond
- the millisecond to set
setMinute
public void setMinute(short minute)
set the minute field for this date/time type.
- setMinute in interface DateTimeBase
minute
- the minute to set.
setSecond
public void setSecond(short second)
Sets the seconds field for this date/time type, not including the
fractional seconds. Any fractional seconds previously set is unmodified.
- setSecond in interface DateTimeBase
second
- the second to set
setValues
public void setValues(short[] values)
Sets all the fields by reading the values in an array
if a Time Zone is specificied it has to be set by using
setZone
.
- setValues in interface DateTimeBase
values
- an array of shorts with the values the array is supposed to be
of length 1 and ordered like the following:
setYear
public void setYear(short year)
Sets the Year field. Note: year 0000 is not allowed.
- setYear in interface DateTimeBase
toDate
public java.util.Date toDate()
converts this GMonth into a local java Date.
- toDate in interface DateTimeBase
- a local date representing this Date.
toString
public String toString()
convert this GMonth to a string
The format is defined by W3C XML Schema recommendation and ISO8601
i.e --MM--(Z|(+|-)hh:mm)
- a string representing this Date