Class GedcomxDateApproximate

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

public class GedcomxDateApproximate extends GedcomxDate
An Approximate Date
Author:
John Clark.
  • Constructor Details

    • GedcomxDateApproximate

      public GedcomxDateApproximate(String date)
      Instantiate a new approximate date
      Parameters:
      date - The formal date string
  • Method Details

    • getSimpleDate

      public GedcomxDateSimple getSimpleDate()
      Return the underlying simple date
      Returns:
      The Simple Date
    • getType

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

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

      public String toFormalString()
      Returns the formal representation of this date
      Specified by:
      toFormalString in class GedcomxDate
      Returns:
      The formal String
    • getYear

      public Integer getYear()
      Get the year
      Returns:
      The Year
    • getMonth

      public Integer getMonth()
      Get the month
      Returns:
      The Month
    • getDay

      public Integer getDay()
      Get the day
      Returns:
      The Day
    • 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
    • getTzHours

      public Integer getTzHours()
      Get the timezone hours
      Returns:
      The Timezone Hours
    • getTzMinutes

      public Integer getTzMinutes()
      Get the timezone minutes
      Returns:
      The Timezone Minutes
    • compareTo

      public int compareTo(GedcomxDate other)
      Calls the compareTo method on the simple date that this GedcomxDateApproximate contains. See GedcomxDateSimple.compareTo(GedcomxDate) for more information
      Specified by:
      compareTo in interface Comparable<GedcomxDate>
      Overrides:
      compareTo in class GedcomxDate
      Parameters:
      other - the object to be compared.
      Returns:
      a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object