Class GedcomxDateDuration

java.lang.Object
org.gedcomx.date.GedcomxDate
org.gedcomx.date.GedcomxDateDuration
All Implemented Interfaces:
Comparable<GedcomxDate>

public class GedcomxDateDuration extends GedcomxDate
The duration between two simple dates
Author:
John Clark.
  • Constructor Details

    • GedcomxDateDuration

      public GedcomxDateDuration(String str)
      Create a new duration from the formal string
      Parameters:
      str - The formal duration string
  • Method Details

    • getType

      public GedcomxDateType getType()
      The type of this date
      Specified by:
      getType in class GedcomxDate
      Returns:
      The date type
    • isApproximate

      public boolean isApproximate()
      A Duration is NEVER Approximate
      Specified by:
      isApproximate in class GedcomxDate
      Returns:
      True if the duration is approximate (It never is)
    • toFormalString

      public String toFormalString()
      The formal string representation of the duration
      Specified by:
      toFormalString in class GedcomxDate
      Returns:
      The formal string
    • getYears

      public Integer getYears()
      Get the years
      Returns:
      The Years
    • getMonths

      public Integer getMonths()
      Get the months
      Returns:
      The Months
    • getDays

      public Integer getDays()
      Get the days
      Returns:
      The Days
    • getHours

      public Integer getHours()
      Get the hours
      Returns:
      The Hours
    • getMinutes

      public Integer getMinutes()
      Get the minutes
      Returns:
      The Minutes
    • getSeconds

      public Integer getSeconds()
      Get the seconds
      Returns:
      The Seconds