Package org.gedcomx.date
Class GedcomxDateRange
- java.lang.Object
-
- org.gedcomx.date.GedcomxDate
-
- org.gedcomx.date.GedcomxDateRange
-
- All Implemented Interfaces:
Comparable<GedcomxDate>
public class GedcomxDateRange extends GedcomxDate
A Date Range- Author:
- John Clark.
-
-
Constructor Summary
Constructors Constructor Description GedcomxDateRange(String date)Instantiate a new Range date from the formal string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GedcomxDateDurationgetDuration()Get the duration between the start and end datesGedcomxDateSimplegetEnd()Get the end of the rangeGedcomxDateSimplegetStart()Get the start of the rangeGedcomxDateTypegetType()Get the type of this datebooleanisApproximate()Whether or not this date is considered approximateStringtoFormalString()Return the formal string for this date-
Methods inherited from class org.gedcomx.date.GedcomxDate
compareTo
-
-
-
-
Constructor Detail
-
GedcomxDateRange
public GedcomxDateRange(String date)
Instantiate a new Range date from the formal string- Parameters:
date- The formal date string
-
-
Method Detail
-
getStart
public GedcomxDateSimple getStart()
Get the start of the range- Returns:
- The Start Date
-
getDuration
public GedcomxDateDuration getDuration()
Get the duration between the start and end dates- Returns:
- The Duration
-
getEnd
public GedcomxDateSimple getEnd()
Get the end of the range- Returns:
- The End Date
-
getType
public GedcomxDateType getType()
Get the type of this date- Specified by:
getTypein classGedcomxDate- Returns:
- The Date Type
-
isApproximate
public boolean isApproximate()
Whether or not this date is considered approximate- Specified by:
isApproximatein classGedcomxDate- Returns:
- True if it this date is approximate
-
toFormalString
public String toFormalString()
Return the formal string for this date- Specified by:
toFormalStringin classGedcomxDate- Returns:
- The formal string
-
-