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 Details

    • GedcomxDateRange

      public GedcomxDateRange(String date)
      Instantiate a new Range date from the formal string
      Parameters:
      date - The formal date string
  • Method Details

    • 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:
      getType in class GedcomxDate
      Returns:
      The Date Type
    • isApproximate

      public boolean isApproximate()
      Whether or not this date is considered approximate
      Specified by:
      isApproximate in class GedcomxDate
      Returns:
      True if it this date is approximate
    • toFormalString

      public String toFormalString()
      Return the formal string for this date
      Specified by:
      toFormalString in class GedcomxDate
      Returns:
      The formal string