public class DateUtilities extends Object
Various static methods helpful for handling dates.
Modifier and Type | Field and Description |
---|---|
static DecimalFormat |
threeDigitZeroPaddedFormat |
static SimpleDateFormat |
yyyymmddFormat |
Modifier and Type | Method and Description |
---|---|
static String |
getAgeBetweenAsDICOMAgeString(Calendar earlierDate,
Calendar laterDate)
Get a DICOM Age String (AS) VR form age between two dates.
|
static String |
getAgeBetweenAsDICOMAgeString(Date earlierDate,
Date laterDate)
Get a DICOM Age String (AS) VR form age between two dates.
|
static String |
getAgeBetweenAsDICOMAgeString(String earlierDate,
String laterDate)
Get a DICOM Age String (AS) VR form age between two dates.
|
public static DecimalFormat threeDigitZeroPaddedFormat
public static SimpleDateFormat yyyymmddFormat
public static String getAgeBetweenAsDICOMAgeString(Calendar earlierDate, Calendar laterDate) throws IllegalArgumentException
Get a DICOM Age String (AS) VR form age between two dates.
Uses UK (not US) convention for leap year birthdays (earlierDate).
earlierDate
- for example, the date of birthlaterDate
- for example, the current dateIllegalArgumentException
- if the later date is earlier than the earlier datepublic static String getAgeBetweenAsDICOMAgeString(Date earlierDate, Date laterDate) throws IllegalArgumentException
Get a DICOM Age String (AS) VR form age between two dates.
Uses UK (not US) convention for leap year birthdays (earlierDate).
earlierDate
- for example, the date of birthlaterDate
- for example, the current dateIllegalArgumentException
- if the later date is earlier than the earlier datepublic static String getAgeBetweenAsDICOMAgeString(String earlierDate, String laterDate) throws ParseException, IllegalArgumentException
Get a DICOM Age String (AS) VR form age between two dates.
Uses UK (not US) convention for leap year birthdays (earlierDate).
earlierDate
- for example, the date of birthlaterDate
- for example, the current dateParseException
- if one of the dates is not in the correct formIllegalArgumentException
- if the later date is earlier than the earlier date