public class GedcomxDateUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
GedcomxDateUtil.Date
A simplified representation of a date.
|
| Constructor and Description |
|---|
GedcomxDateUtil() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static GedcomxDate parse(String date)
date - The GedcomX Datepublic static GedcomxDateDuration getDuration(GedcomxDateSimple startDate, GedcomxDateSimple endDate)
startDate - The start dateendDate - The end datepublic static GedcomxDateSimple addDuration(GedcomxDateSimple startDate, GedcomxDateDuration duration)
startDate - The date to start fromduration - The duration to addpublic static GedcomxDateDuration multiplyDuration(GedcomxDateDuration duration, int multiplier)
duration - The duration to multiplymultiplier - The amount to multiply bypublic static int daysInMonth(Integer month, Integer year)
month - The monthyear - The yearprotected static void zipDates(GedcomxDateUtil.Date start, GedcomxDateUtil.Date end)
start - The start dateend - The end dateprotected static void zipDuration(GedcomxDateUtil.Date date, GedcomxDateDuration duration)
date - The start dateduration - The durationCopyright © 2017. All rights reserved.