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