public class Month extends TimePeriod
Describe an XML schema Month.
The date type is derived from time period by setting up the facet :
| Constructor and Description |
|---|
Month() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
parse(java.lang.String str) |
static Month |
parseMonth(java.lang.String str)
parse a String and convert it into a Month
|
void |
setDay(short day)
set the Day Field
|
void |
setHour(short hour)
set the hour field for this recurringDuration
|
void |
setMinute(short minute)
set the minute field for this recurringDuration
|
void |
setSecond(short second,
short millsecond)
set the second field for this recurringDuration
|
void |
setZone(short hour,
short minute)
set the time zone fields for this recurringDuration
|
void |
setZoneNegative()
set the time zone negative field to true
|
java.util.Date |
toDate()
convert this recurringDuration into a local Date
|
java.lang.String |
toString()
convert this Month to a string
The format is defined by W3C XML Schema draft and ISO8601
i.e (+|-)CCYY-MM
|
setFields, setPeriodequal, equals, getCentury, getDay, getMonth, getValues, getYear, isGreater, isLeap, parseRecurringDuration, setCentury, setMonth, setValues, setYearequal, getDuration, getHour, getMilli, getMinute, getPeriod, getSeconds, getZoneHour, getZoneMinute, isGreater, isNegative, isUTC, isZoneNegative, setDuration, setDuration, setNegative, setPeriod, setUTCpublic void setDay(short day)
throws OperationNotSupportedException
RecurringDurationsetDay in class RecurringDurationday - the value to set up
Note a validation is done on the day fieldOperationNotSupportedExceptionpublic void setHour(short hour)
throws OperationNotSupportedException
RecurringDurationBasesetHour in class RecurringDurationBasehour - the hour to setOperationNotSupportedException - this exception is thrown when
changing the value of the hour field is not allowedpublic void setMinute(short minute)
throws OperationNotSupportedException
RecurringDurationBasesetMinute in class RecurringDurationBaseminute - the minute to setOperationNotSupportedException - this exception is thrown when
changing the value of the minute field is not allowedpublic void setSecond(short second,
short millsecond)
throws OperationNotSupportedException
RecurringDurationBasesetSecond in class RecurringDurationBasesecond - the second to setmillsecond - the millisecond to setOperationNotSupportedException - this exception is thrown when
changing the value of the second field is not allowedpublic void setZone(short hour,
short minute)
throws OperationNotSupportedException
RecurringDurationBasesetZone in class RecurringDurationBasehour - the time zone hour to setminute - the time zone minute to setOperationNotSupportedException - this exception is thrown when
changing the value of the time zone fields is not allowedpublic void setZoneNegative()
throws OperationNotSupportedException
RecurringDurationBasesetZoneNegative in class RecurringDurationBaseOperationNotSupportedException - this exception is thrown when
changing the time zone fields is not allowedpublic java.lang.String toString()
toString in class RecurringDurationpublic static java.lang.Object parse(java.lang.String str)
throws java.text.ParseException
java.text.ParseExceptionpublic static Month parseMonth(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 java.util.Date toDate()
throws java.text.ParseException
RecurringDurationNote : 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 class RecurringDurationjava.text.ParseExceptionIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com