org.dcm4che2.util
Class DateUtils

java.lang.Object
  extended by org.dcm4che2.util.DateUtils

public class DateUtils
extends java.lang.Object

Since:
Jun 27, 2005
Version:
$Revision: 8397 $ $Date: 2008-11-27 15:38:16 +0100 (Thu, 27 Nov 2008) $
Author:
gunter zeilinger(gunterze@gmail.com)

Constructor Summary
DateUtils()
           
 
Method Summary
static java.lang.String formatDA(java.util.Date d)
           
static java.lang.String formatDT(java.util.Date d)
           
static java.lang.String formatTM(java.util.Date d)
           
static java.util.Date parseDA(java.lang.String s, boolean end)
           
static java.util.Date parseDT(java.lang.String s, boolean end)
           
static java.util.Date parseTM(java.lang.String s, boolean end)
          Parses a value that has a TM VR as a Date.
static java.util.Date toDateTime(java.util.Date date, java.util.Date time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateUtils

public DateUtils()
Method Detail

parseDA

public static java.util.Date parseDA(java.lang.String s,
                                     boolean end)

parseTM

public static java.util.Date parseTM(java.lang.String s,
                                     boolean end)
Parses a value that has a TM VR as a Date.

Parameters:
s - the TM string to parse.
end - whether or not to initialize missing precision to the maximum values (December 31st, 23:59).
Returns:
the parsed date or null if the input is empty.

parseDT

public static java.util.Date parseDT(java.lang.String s,
                                     boolean end)

formatDA

public static java.lang.String formatDA(java.util.Date d)

formatTM

public static java.lang.String formatTM(java.util.Date d)

formatDT

public static java.lang.String formatDT(java.util.Date d)

toDateTime

public static java.util.Date toDateTime(java.util.Date date,
                                        java.util.Date time)


Copyright © 2011 dcm4che. All Rights Reserved.