public class DateUtilities
extends java.lang.Object
Various static methods helpful for handling dates.
| Modifier and Type | Field and Description |
|---|---|
static java.text.DecimalFormat |
threeDigitZeroPaddedFormat |
static java.text.SimpleDateFormat |
yyyymmddFormat |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getAgeBetweenAsDICOMAgeString(java.util.Calendar earlierDate,
java.util.Calendar laterDate)
Get a DICOM Age String (AS) VR form age between two dates.
|
static java.lang.String |
getAgeBetweenAsDICOMAgeString(java.util.Date earlierDate,
java.util.Date laterDate)
Get a DICOM Age String (AS) VR form age between two dates.
|
static java.lang.String |
getAgeBetweenAsDICOMAgeString(java.lang.String earlierDate,
java.lang.String laterDate)
Get a DICOM Age String (AS) VR form age between two dates.
|
public static java.text.SimpleDateFormat yyyymmddFormat
public static java.text.DecimalFormat threeDigitZeroPaddedFormat
public static java.lang.String getAgeBetweenAsDICOMAgeString(java.lang.String earlierDate,
java.lang.String laterDate)
throws java.text.ParseException,
java.lang.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 datejava.text.ParseException - if one of the dates is not in the correct formjava.lang.IllegalArgumentException - if the later date is earlier than the earlier datepublic static java.lang.String getAgeBetweenAsDICOMAgeString(java.util.Date earlierDate,
java.util.Date laterDate)
throws java.lang.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 datejava.lang.IllegalArgumentException - if the later date is earlier than the earlier datepublic static java.lang.String getAgeBetweenAsDICOMAgeString(java.util.Calendar earlierDate,
java.util.Calendar laterDate)
throws java.lang.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 datejava.lang.IllegalArgumentException - if the later date is earlier than the earlier date