public class DatatypeConverter extends Object
Constructor and Description |
---|
DatatypeConverter() |
Modifier and Type | Method and Description |
---|---|
static Date |
parseDate(String lexicalXSDDate)
Converts the string argument into a date (
Date ) value. |
static Date |
parseDateTime(String lexicalXSDDateTime)
Converts the string argument into a date/time (
Date ) value. |
static Date |
parseTime(String lexicalXSDTime)
Converts the string argument into a time (
Date ) value. |
static String |
printDate(Date val)
Converts a date (
Date ) value into a string. |
static String |
printDateTime(Date val)
Converts a date/time (
Date ) value into a string. |
static String |
printTime(Date val)
Converts a time (
Date ) value into a string. |
public static Date parseDate(String lexicalXSDDate)
Converts the string argument into a date (Date
) value.
lexicalXSDDate
- A string containing lexical representation of xsd:date.Date
) value represented by the string argument.IllegalArgumentException
- if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes
for xsd:date.public static String printDate(Date val)
Converts a date (Date
) value into a string.
val
- A date (Date
) valueIllegalArgumentException
- if val is null.public static Date parseTime(String lexicalXSDTime)
Converts the string argument into a time (Date
) value.
lexicalXSDTime
- A string containing lexical representation of xsd:time.Date
) value represented by the string argument.IllegalArgumentException
- if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes
for xsd:time.public static String printTime(Date val)
Converts a time (Date
) value into a string.
val
- A time (Date
) valueIllegalArgumentException
- if val is null.public static Date parseDateTime(String lexicalXSDDateTime)
Converts the string argument into a date/time (Date
) value.
lexicalXSDDateTime
- A string containing lexical representation of xsd:dateTime.Date
) value represented by the string argument.IllegalArgumentException
- if string parameter does not conform to lexical value space defined in XML Schema Part 2: Datatypes
for xsd:date/Time.public static String printDateTime(Date val)
Converts a date/time (Date
) value into a string.
val
- A date/time (Date
) valueIllegalArgumentException
- if val is null.Copyright © 2016 Alfresco. All rights reserved.