public class GedcomxDateUtil extends Object
| 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)
Deprecated.
this method is just a pass through to java.time.YearMonth.lengthOfMonth
|
static GedcomxDateDuration |
getDuration(GedcomxDateSimple startDate,
GedcomxDateSimple endDate)
Calculates the Duration between two dates
|
static GedcomxDateRange |
javaDatesToGedcomxDateRange(Date fromDate,
Date toDate)
Converts two java.util.Date objects to a GedcomxDateRange object.
|
static GedcomxDateSimple |
javaDateToGedcomxDateSimple(Date javaDate)
Converts a java.util.Date to a GedcomxDate object.
|
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
|
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 by@Deprecated public static int daysInMonth(Integer month, Integer year)
month - The monthyear - The yearpublic static GedcomxDateSimple javaDateToGedcomxDateSimple(Date javaDate)
javaDate - The java.util.Date object to convert.public static GedcomxDateRange javaDatesToGedcomxDateRange(Date fromDate, Date toDate)
fromDate - the start of the range. This cannot be null.toDate - the end of the range. This may be null.GedcomxDateException - if fromDate is null.Copyright © 2025. All rights reserved.