org.gedcomx.date
Class GedcomxDateDuration

java.lang.Object
  extended by org.gedcomx.date.GedcomxDate
      extended by org.gedcomx.date.GedcomxDateDuration

public class GedcomxDateDuration
extends GedcomxDate

The duration between two simple dates

Author:
John Clark.

Constructor Summary
GedcomxDateDuration(String str)
          Create a new duration from the formal string
 
Method Summary
 Integer getDays()
          Get the days
 Integer getHours()
          Get the hours
 Integer getMinutes()
          Get the minutes
 Integer getMonths()
          Get the months
 Integer getSeconds()
          Get the seconds
 GedcomxDateType getType()
          The type of this date
 Integer getYears()
          Get the years
 boolean isApproximate()
          A Duration is NEVER Approximate
 String toFormalString()
          The formal string representation of the duration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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:
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


Copyright © 2015. All rights reserved.