org.exolab.castor.types
Class Year
- java.io.Serializable
Describe an XML schema Year.
The date type is derived from time period by setting up the facet :
Note: This datatype is not included in any recommendation. It was introduced
in http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/ and was last in
http://www.w3.org/TR/2000/CR-xmlschema-2-20001024/ and was removed by
http://www.w3.org/TR/2001/PR-xmlschema-2-20010316/. It was not in the final
approved recommendation: http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/
static Object | parse(String str)- parse a String and convert it into a java.lang.Object
|
static Year | parseYear(String str)- parse a String and convert it into a Year
|
void | setDay(short day)- set the Day Field
|
void | setHour(short hour)
|
void | setMinute(short minute)
|
void | setMonth(short month)- set the Month Field
|
void | setSecond(short second, short millsecond)
|
void | setZone(short hour, short minute)
|
void | setZoneNegative()
|
java.util.Date | toDate()- convert this recurringDuration into a local Date
Note : Be aware a the 'local' property of the date i.e toDate() will de the
conversion between a UTC date and your computer date format.
|
String | toString()- convert this Year to a string
The format is defined by W3C XML Schema draft and ISO8601
i.e (+|-)CCYY
|
equal, equals, getCentury, getDay, getMonth, getValues, getYear, isGreater, isLeap, parse, parseRecurringDuration, setCentury, setDay, setMonth, setValues, setYear, toDate, toString |
equal, equals, getDuration, getHour, getMilli, getMinute, getPeriod, getSeconds, getValues, getZoneHour, getZoneMinute, isGreater, isNegative, isUTC, isZoneNegative, setDuration, setDuration, setHour, setMinute, setNegative, setPeriod, setPeriod, setSecond, setUTC, setValues, setZone, setZoneNegative |
parse
public static Object parse(String str)
throws ParseException parse a String and convert it into a java.lang.Object
- parse in interface RecurringDuration
str - the string to parse
- the java.lang.Object represented by the string
parseYear
public static Year parseYear(String str)
throws ParseException parse a String and convert it into a Year
str - the string to parse
- the Year represented by the string
setDay
public void setDay(short day)
throws UnsupportedOperationException set the Day Field
- setDay in interface RecurringDuration
day - the value to set up
Note a validation is done on the day field
setMonth
public void setMonth(short month)
throws UnsupportedOperationException set the Month Field
- setMonth in interface RecurringDuration
month - the value to set up
Note 1<12>12>
toDate
public java.util.Date toDate()
throws ParseException convert this recurringDuration into a local Date
Note : Be aware a the 'local' property of the date i.e
toDate() will de the
conversion between a UTC date and your computer date format.
For instance if you have set up your computer time zone on the Pacific Day Time
the conversion of
2000-10-20T00:00:00.000 into a
java.util.Date
will return
Thu Oct 19 17:00:00 PDT 2000
- toDate in interface RecurringDuration
- a local date representing this recurringDuration
toString
public String toString()
convert this Year to a string
The format is defined by W3C XML Schema draft and ISO8601
i.e (+|-)CCYY
- toString in interface RecurringDuration
- a string representing this Month
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com