public class IlrGYearMonth extends IlrTimeZone
gYearMonth of the W3C XML
Schema recommendation (
http://www.w3.org/TR/xmlschema-2/#gYearMonth).EQUAL, GREATER, LOWER| Constructor and Description |
|---|
IlrGYearMonth()
Builds a
gYearMonth without any time zone. |
IlrGYearMonth(java.util.Date date)
Builds a
gYearMonth without any time zone from a date. |
IlrGYearMonth(java.util.Date date,
java.util.TimeZone timeZone)
Builds a
gYearMonth from a date and a time zone. |
IlrGYearMonth(long l)
Builds an
IlrGYearMonth from a long. |
IlrGYearMonth(java.lang.String str)
Builds a
gYearMonth from a string. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IlrGYearMonth date)
Compares two
GYearMonths. |
boolean |
equals(java.lang.Object obj) |
short |
getCentury()
Gets the century.
|
short |
getMonth()
Gets the month.
|
short |
getYear()
Gets the year.
|
boolean |
isEqual(IlrGYearMonth dt)
Determines if two
gYearMonth are equal. |
boolean |
isPositive()
Determines if the
gYearMonth is positive. |
static IlrGYearMonth |
parse(java.lang.String str)
Creates a
gYearMonth from a string. |
void |
set(java.util.Date date)
Sets the
gYearMonth from a date. |
void |
set(java.util.Date date,
java.util.TimeZone timeZone)
Sets the
gYearMonth from a date and a time zone. |
void |
setDate(short century,
short year,
short month)
Sets the
gYeatrMonth from century/year/month. |
void |
setPositive(boolean positive)
Sets the year as positive.
|
java.util.Date |
toDate()
Converts the
gYearMonth to a date. |
java.lang.String |
toString() |
static IlrGYearMonth |
valueOf(java.lang.String str)
Creates a
gYearMonth from a string. |
formatToString, formatToString, getTimeZoneInMillis, getZoneHour, getZoneMinute, isEqual, isUTC, isZonePositive, setTimeZone, setTimeZoneInMillis, setUTC, toTimeZone, unsetUTCpublic IlrGYearMonth()
gYearMonth without any time zone.public IlrGYearMonth(long l)
IlrGYearMonth from a long.l - The long parameterpublic IlrGYearMonth(java.util.Date date)
gYearMonth without any time zone from a date.public IlrGYearMonth(java.util.Date date,
java.util.TimeZone timeZone)
gYearMonth from a date and a time zone.public IlrGYearMonth(java.lang.String str)
throws IlrDateFormatException
gYearMonth from a string.IlrDateFormatException - When the string format is invalid.public void set(java.util.Date date)
gYearMonth from a date.public void set(java.util.Date date,
java.util.TimeZone timeZone)
gYearMonth from a date and a time zone.public void setPositive(boolean positive)
public void setDate(short century,
short year,
short month)
gYeatrMonth from century/year/month.public boolean isPositive()
gYearMonth is positive.public short getCentury()
public short getYear()
public short getMonth()
public java.util.Date toDate()
throws IlrDateFormatException
gYearMonth to a date.IlrDateFormatExceptionpublic java.lang.String toString()
toString in class IlrTimeZonepublic boolean isEqual(IlrGYearMonth dt)
gYearMonth are equal.public boolean equals(java.lang.Object obj)
equals in class IlrTimeZonepublic int compareTo(IlrGYearMonth date)
GYearMonths. A GREATER comparison result means
that the current GYearMonth is after the
GYearMonth used in the parameter.public static IlrGYearMonth parse(java.lang.String str) throws IlrDateFormatException
gYearMonth from a string.IlrDateFormatException - When the string format is invalid.public static IlrGYearMonth valueOf(java.lang.String str)
gYearMonth from a string.IlrDateFormatException - When the string format is invalid.© Copyright IBM Corp. 1987, 2017