public class MetadataUtils
extends java.lang.Object
Constructor and Description |
---|
MetadataUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Date |
parseDate(java.lang.String dateString)
Converts a String of the union.dateType or ISO8601 UTC datastamp form to a Date.
|
static java.util.Date |
parseISO8601DateStamp(java.lang.String datestamp)
Converts an ISO8601 UTC datastamp of the form yyyy-MM-ddTHH:mm:ssZ or the short form yyyy-MM-dd to a Java
Date.
|
static java.util.Date |
parseUnionDateType(java.lang.String dateString)
Converts a String in a DLESE union.dateType format into a Java Date object.
|
public static final java.util.Date parseUnionDateType(java.lang.String dateString) throws java.text.ParseException
dateString
- A String that in one of the following four formats: YYYY-mm-dd, YYYY-mm, YYYY.java.text.ParseException
- If unable to interpret the date String using the given format.public static final java.util.Date parseISO8601DateStamp(java.lang.String datestamp) throws java.text.ParseException
datestamp
- A datestamp in UTC format.java.text.ParseException
- If unable to interpret the datestamp.public static final java.util.Date parseDate(java.lang.String dateString) throws java.text.ParseException
dateString
- A date Stringjava.text.ParseException
- If unable to parse the date