|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gedcomx.date.GedcomxDateUtil
public class GedcomxDateUtil
Static utility functions for handling GedcomX Dates
| Nested Class Summary | |
|---|---|
protected static class |
GedcomxDateUtil.Date
A simplified representation of a date. |
| Constructor Summary | |
|---|---|
GedcomxDateUtil()
|
|
| Method Summary | |
|---|---|
static GedcomxDateSimple |
addDuration(GedcomxDateSimple startDate,
GedcomxDateDuration duration)
Add a duration to a simple date |
static int |
daysInMonth(Integer month,
Integer year)
Find the number of days in a month within a given year |
static GedcomxDateDuration |
getDuration(GedcomxDateSimple startDate,
GedcomxDateSimple endDate)
Calculates the Duration between two dates |
static GedcomxDateDuration |
multiplyDuration(GedcomxDateDuration duration,
int multiplier)
Multiple a duration by a fixed number |
static GedcomxDate |
parse(String date)
Parse a String representation of a Formal GedcomX Date |
protected static void |
zipDates(GedcomxDateUtil.Date start,
GedcomxDateUtil.Date end)
Ensures that both start and end have values where the other has values. |
protected static void |
zipDuration(GedcomxDateUtil.Date date,
GedcomxDateDuration duration)
Ensures that date has its properties initialized based on what the duration has. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GedcomxDateUtil()
| Method Detail |
|---|
public static GedcomxDate parse(String date)
date - The GedcomX Date
public static GedcomxDateDuration getDuration(GedcomxDateSimple startDate,
GedcomxDateSimple endDate)
startDate - The start dateendDate - The end date
public static GedcomxDateSimple addDuration(GedcomxDateSimple startDate,
GedcomxDateDuration duration)
startDate - The date to start fromduration - The duration to add
public static GedcomxDateDuration multiplyDuration(GedcomxDateDuration duration,
int multiplier)
duration - The duration to multiplymultiplier - The amount to multiply by
public static int daysInMonth(Integer month,
Integer year)
month - The monthyear - The year
protected static void zipDates(GedcomxDateUtil.Date start,
GedcomxDateUtil.Date end)
start - The start dateend - The end date
protected static void zipDuration(GedcomxDateUtil.Date date,
GedcomxDateDuration duration)
date - The start dateduration - The duration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||