Package org.gedcomx.date
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 Summary
Constructors Constructor Description GedcomxDateDuration(String str)Create a new duration from the formal string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetDays()Get the daysIntegergetHours()Get the hoursIntegergetMinutes()Get the minutesIntegergetMonths()Get the monthsIntegergetSeconds()Get the secondsGedcomxDateTypegetType()The type of this dateIntegergetYears()Get the yearsbooleanisApproximate()A Duration is NEVER ApproximateStringtoFormalString()The formal string representation of the duration-
Methods inherited from class org.gedcomx.date.GedcomxDate
compareTo
-
-
-
-
Constructor Detail
-
GedcomxDateDuration
public GedcomxDateDuration(String str)
Create a new duration from the formal string- Parameters:
str- The formal duration string
-
-
Method Detail
-
getType
public GedcomxDateType getType()
The type of this date- Specified by:
getTypein classGedcomxDate- Returns:
- The date type
-
isApproximate
public boolean isApproximate()
A Duration is NEVER Approximate- Specified by:
isApproximatein classGedcomxDate- Returns:
- True if the duration is approximate (It never is)
-
toFormalString
public String toFormalString()
The formal string representation of the duration- Specified by:
toFormalStringin classGedcomxDate- 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
-
-