Package org.gedcomx.date
Class GedcomxDateApproximate
java.lang.Object
org.gedcomx.date.GedcomxDate
org.gedcomx.date.GedcomxDateApproximate
- All Implemented Interfaces:
Comparable<GedcomxDate>
An Approximate Date
- Author:
- John Clark.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(GedcomxDate other) Calls thecompareTomethod on the simple date that this GedcomxDateApproximate contains.getDay()Get the daygetHours()Get the hoursGet the minutesgetMonth()Get the monthGet the secondsReturn the underlying simple dategetType()The type of this dateGet the timezone hoursGet the timezone minutesgetYear()Get the yearbooleanWhether or not this date is approximateReturns the formal representation of this date
-
Constructor Details
-
GedcomxDateApproximate
Instantiate a new approximate date- Parameters:
date- The formal date string
-
-
Method Details
-
getSimpleDate
Return the underlying simple date- Returns:
- The Simple Date
-
getType
The type of this date- Specified by:
getTypein classGedcomxDate- Returns:
- The Type
-
isApproximate
public boolean isApproximate()Whether or not this date is approximate- Specified by:
isApproximatein classGedcomxDate- Returns:
- True
-
toFormalString
Returns the formal representation of this date- Specified by:
toFormalStringin classGedcomxDate- Returns:
- The formal String
-
getYear
Get the year- Returns:
- The Year
-
getMonth
Get the month- Returns:
- The Month
-
getDay
Get the day- Returns:
- The Day
-
getHours
Get the hours- Returns:
- The Hours
-
getMinutes
Get the minutes- Returns:
- The Minutes
-
getSeconds
Get the seconds- Returns:
- The Seconds
-
getTzHours
Get the timezone hours- Returns:
- The Timezone Hours
-
getTzMinutes
Get the timezone minutes- Returns:
- The Timezone Minutes
-
compareTo
Calls thecompareTomethod on the simple date that this GedcomxDateApproximate contains. SeeGedcomxDateSimple.compareTo(GedcomxDate)for more information- Specified by:
compareToin interfaceComparable<GedcomxDate>- Overrides:
compareToin classGedcomxDate- 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
-