org.gedcomx.date
Class GedcomxDateRange

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

public class GedcomxDateRange
extends GedcomxDate

A Date Range

Author:
John Clark.

Constructor Summary
GedcomxDateRange(String date)
          Instantiate a new Range date from the formal string
 
Method Summary
 GedcomxDateDuration getDuration()
          Get the duration between the start and end dates
 GedcomxDateSimple getEnd()
          Get the end of the range
 GedcomxDateSimple getStart()
          Get the start of the range
 GedcomxDateType getType()
          Get the type of this date
 boolean isApproximate()
          Whether or not this date is considered approximate
 String toFormalString()
          Return the formal string for this date
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GedcomxDateRange

public GedcomxDateRange(String date)
Instantiate a new Range date from the formal string

Parameters:
date - The formal date string
Method Detail

getStart

public GedcomxDateSimple getStart()
Get the start of the range

Returns:
The Start Date

getDuration

public GedcomxDateDuration getDuration()
Get the duration between the start and end dates

Returns:
The Duration

getEnd

public GedcomxDateSimple getEnd()
Get the end of the range

Returns:
The End Date

getType

public GedcomxDateType getType()
Get the type of this date

Specified by:
getType in class GedcomxDate
Returns:
The Date Type

isApproximate

public boolean isApproximate()
Whether or not this date is considered approximate

Specified by:
isApproximate in class GedcomxDate
Returns:
True if it this date is approximate

toFormalString

public String toFormalString()
Return the formal string for this date

Specified by:
toFormalString in class GedcomxDate
Returns:
The formal string


Copyright © 2015. All rights reserved.