Trispark JDT
2.50.13

com.archimed.dicom
Class DDate

java.lang.Object
  extended by com.archimed.dicom.DDate

public class DDate
extends java.lang.Object

This class represents a basic date object. It was developed in correspondance to the Dicom DA type, so it only contains year, month and day information. If you should need a date-range, use DDateRange (based on DDate).

Since:
18/02/1999
See Also:
DDateRange

Field Summary
protected  JdtLogger log
           
 
Constructor Summary
DDate()
          Empty constructor, provided for constructing an empty DA data element.
DDate(java.lang.String str)
          This constructor takes a string and converts it to a DDate object.
 
Method Summary
 boolean isEmpty()
          Indicates whether this DDate is empty.
 java.lang.String toDICOMString()
          Returns a String representing the date, formatted in the Dicom DA format ("yyyymmdd").
 java.lang.String toString()
          Returns a String representing the date.
 java.lang.String toString(java.text.DateFormat format)
          Returns a String representing the date, formatted with the given DateFormat.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected JdtLogger log
Constructor Detail

DDate

public DDate()
Empty constructor, provided for constructing an empty DA data element.


DDate

public DDate(java.lang.String str)
      throws java.lang.NumberFormatException
This constructor takes a string and converts it to a DDate object. Make sure to use a String with format "yyyymmdd" or this constructor will throw an NumberFormatException.

Throws:
java.lang.NumberFormatException
Method Detail

toString

public java.lang.String toString()
Returns a String representing the date. The used format is EEE dd MMM yyyy.
Example: (new DDate("19990324")).toString() returns something like "wo 24 mrt 1999" (depending on your default locale).

Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.text.DateFormat format)
Returns a String representing the date, formatted with the given DateFormat.


toDICOMString

public java.lang.String toDICOMString()
Returns a String representing the date, formatted in the Dicom DA format ("yyyymmdd").


isEmpty

public boolean isEmpty()
Indicates whether this DDate is empty.


Trispark JDT
2.50.13

Copyright © 1999-2008 Trispark. All Rights Reserved.