|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gedcomx.util.date.SimpleDate
public class SimpleDate
"Simple date" string is generally: (+|-)YYYY-MM-DDThh:mm:ss((+\-)hh:mm|Z) or, using square brackets around optional parts: (+|-)YYYY[-MM[-DD[Thh[:mm[:ss[(+\-)hh[:mm]|Z]]]]]]
| Constructor Summary | |
|---|---|
SimpleDate(int year)
Deprecated. Constructure that takes only a year, where -9999 = 10000 B.C.; -1 = 2 B.C.; 0 = 1 B.C.; 1 = 1 A.D.; 9999 = 9999 A.D. |
|
SimpleDate(int year,
Integer month,
Integer day,
Integer hour,
Integer minute,
Integer second,
boolean isUTC,
Integer timeZoneHours,
Integer timeZoneMinutes)
Deprecated. Constructor with a complete set of parameters. |
|
SimpleDate(String simpleDateString)
Deprecated. Parse a GedcomX "simple date" string of the form: (+|-)YYYY[-MM[-DD[Thh[:mm[:ss]][Z|(+|-)hh[:mm]]]]] |
|
| Method Summary | |
|---|---|
Integer |
getDay()
Deprecated. Get the day of the month as an integer from 1..31. |
Integer |
getHour()
Deprecated. Get the hour of the day as an integer from 0 (=midnight) to 23(=11 p.m.) |
Integer |
getMinute()
Deprecated. Get the minute of the hour as an Integer (0..59). |
Integer |
getMonth()
Deprecated. Get the month as an Integer, where 1=January and 12=December. |
Integer |
getSecond()
Deprecated. Get the second of the minute as an Integer (0..59). |
Integer |
getTimeZoneHours()
Deprecated. Get the hour offset from GMT of the time zone. |
Integer |
getTimeZoneMinutes()
Deprecated. Get the hour minutes of the time zone. |
int |
getYear()
Deprecated. Get the year as an integer. |
boolean |
isUTC()
Deprecated. Get a flag for whether this SimpleDate uses a time in Universal Time Code (UTC), in which case "Z" is used in the string, and the time zone hours and minutes are ignored. |
boolean |
isValid()
Deprecated. Tell whether this SimpleDate is valid. |
void |
setDay(Integer day)
Deprecated. Get the day of the month as an integer from 1..31. |
void |
setHour(Integer hour)
Deprecated. Set the hour of the day as an Integer from 0 (=midnight) to 23 (=11 p.m.). |
void |
setMinute(Integer minute)
Deprecated. Set the minute of the hour as an Integer (0..59) Must be null if there is no hour. |
void |
setMonth(Integer month)
Deprecated. Set the month number as an integer, where 1=January and 12=December. |
void |
setSecond(Integer second)
Deprecated. Set the second of the minute as an Integer (0..59) Must be null if there is no minute. |
void |
setTimeZoneHours(Integer timeZoneHours)
Deprecated. Set the hour offset from GMT of the time zone. |
void |
setTimeZoneMinutes(Integer timeZoneMinutes)
Deprecated. Set the minute offset of the time zone. |
void |
setUTC(boolean UTC)
Deprecated. Set the flag for whether this SimpleDate uses a time in Universal Time Code (UTC), in which case "Z" is used in the string, and the time zone hours and minutes are ignored. |
void |
setYear(int year)
Deprecated. Set the year as an integer. |
String |
toString()
Deprecated. Convert the SimpleDate to a formal GedcomX simple date string, of the form: (+|-)YYYY[-MM[-DD[Thh[:mm[:ss]][(+\-)hh[:mm]|Z]]]] |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleDate(int year)
year - - yearpublic SimpleDate(String simpleDateString)
simpleDateString - - string to parse
public SimpleDate(int year,
Integer month,
Integer day,
Integer hour,
Integer minute,
Integer second,
boolean isUTC,
Integer timeZoneHours,
Integer timeZoneMinutes)
year: - -9999 = 10000 B.C.; -1 = 2 B.C.; 0 = 1 B.C.; 1 = 1 A.D.; 9999 = 9999 A.D.month: - 1..12, or nullday: - 1..31, or null (must be null if month is null)hour: - 0..23 (must be null if day is null)minute: - 0..59 (must be null if hour is null)second: - 0..59 (must be null if minute is null)isUTC: - true => UTC time zone (i.e., use "Z" in string).timeZoneHours: - -23..23 (must be null if isUTC, or if hour is null)timeZoneMinutes: - 00..59 (can be null if 0; must be null if timeZoneHours is null)| Method Detail |
|---|
public boolean isValid()
public String toString()
toString in class Objectpublic int getYear()
public void setYear(int year)
year - - year portion of a GedcomX simple date.public Integer getMonth()
public void setMonth(Integer month)
month - - Month number (1..12), or null if there is no month.public Integer getDay()
public void setDay(Integer day)
day - - Day number (1..31), or null if there is no day.public Integer getHour()
public void setHour(Integer hour)
hour - - Hour of the day (0..23) or null if there is no hour.public Integer getMinute()
public void setMinute(Integer minute)
minute - - Minute of the hour (0..59), or null if there is no minute.public Integer getSecond()
public void setSecond(Integer second)
second - - Minute of the minute (0..59), or null if there is no second.public boolean isUTC()
public void setUTC(boolean UTC)
public Integer getTimeZoneHours()
public void setTimeZoneHours(Integer timeZoneHours)
timeZoneHours - - Time zone hours, or null if not used.public Integer getTimeZoneMinutes()
public void setTimeZoneMinutes(Integer timeZoneMinutes)
timeZoneMinutes - - Time zone minutes, or null if not used.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||