|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.p13n.xml.schema.Century | +--com.bea.p13n.xml.schema.Year | +--com.bea.p13n.xml.schema.Month
This class provides the Java biding for the XML schema type month as specified in Section 3.3.28 of XML Schema Part 2: Datatypes.
month represents a specific period of time that starts on the first day of the month and lasts until the midnight that ends the last day of the month.
The value space of month is the set of Gregorian calendar months specified as CCYY-MM. It is a set of one-month long, non-period instances independent of how many days this month has.
Example: 2001-01
.
Fields inherited from class com.bea.p13n.xml.schema.Century |
_internal |
Constructor Summary | |
protected |
Month()
Constructs a new Month instance. |
protected |
Month(long year,
int month,
java.util.TimeZone timeZone)
Constructs a new Month for the given year, month and timezone. |
Method Summary | |
java.lang.Object |
clone()
Returns a copy of this Month. |
int |
compareTo(Month anotherMonth)
Compares this Month to another Month object (represented in the same time zone) in their canonical representation. |
int |
compareTo(java.lang.Object anotherObject)
Compares this TimePeriod with another object. |
static Month |
createMonth()
Returns a Month instance for the current month. |
static Month |
createMonth(java.lang.String month)
Given a string of the form CCYY-MM, returns a Month instance. |
int |
getMonth()
Returns the month (MM) field |
void |
setMonth(int month)
Sets the month (MM) field |
java.lang.String |
toString()
Returns a XML schema compliant date string. |
java.lang.Object |
toUTC()
Offsets the current month instant to UTC. |
Methods inherited from class com.bea.p13n.xml.schema.Year |
compareTo,
createYear,
createYear,
getYear,
setYear,
setYear |
Methods inherited from class com.bea.p13n.xml.schema.Century |
compareTo,
createCentury,
createCentury,
getCentury,
getEra,
getTimeZone,
setCentury,
setEra,
setTimeZone,
setTimeZone |
Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
protected Month()
protected Month(long year, int month, java.util.TimeZone timeZone)
year
- the year (CCYY) fieldmonth
- the month (MM) fieldtimezone
- the timezone. May be null if local.Method Detail |
public static Month createMonth()
public static Month createMonth(java.lang.String month) throws java.text.ParseException
Given a string of the form CCYY-MM, returns a Month instance.
The argument may optionally include a timezone.
public int getMonth()
public void setMonth(int month) throws java.lang.IllegalArgumentException
month
- the month (MM)public java.lang.Object toUTC()
public java.lang.Object clone()
public int compareTo(Month anotherMonth)
Compares this Month to another Month object (represented in the same time zone) in their canonical representation.
anotherMonth
- another Month object to be compared.public int compareTo(java.lang.Object anotherObject)
object
- the object to be comparedpublic java.lang.String toString()
Returns a XML schema compliant date string.
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |