public class UtcDateOnlyConverter extends Object
Constructor and Description |
---|
UtcDateOnlyConverter() |
Modifier and Type | Method and Description |
---|---|
protected static void |
assertDigitSequence(String value,
int i,
int j,
String type) |
protected static void |
assertLength(String value,
int i,
String type) |
protected static void |
assertLength(String value,
String type,
int... lengths) |
protected static void |
assertSeparator(String value,
int offset,
char ch,
String type) |
static String |
convert(Date d)
Convert a date to a String ("YYYYMMDD")
|
static String |
convert(LocalDate d) |
static Date |
convert(String value)
Convert between a String and a date
|
static LocalDate |
convertToLocalDate(String value) |
protected DateFormat |
createDateFormat(String format) |
protected static DateTimeFormatter |
createDateTimeFormat(String format) |
static Date |
getDate(LocalDate localDate) |
protected static long |
parseLong(String s) |
protected static void |
throwFieldConvertError(String value,
String type) |
public static String convert(Date d)
d
- the date to convertpublic static Date convert(String value) throws FieldConvertError
value
- the String to convertFieldConvertError
- raised for an invalid date string.public static LocalDate convertToLocalDate(String value) throws FieldConvertError
FieldConvertError
public static Date getDate(LocalDate localDate)
localDate
- protected static void assertLength(String value, int i, String type) throws FieldConvertError
FieldConvertError
protected static void assertLength(String value, String type, int... lengths) throws FieldConvertError
FieldConvertError
protected static void assertDigitSequence(String value, int i, int j, String type) throws FieldConvertError
FieldConvertError
protected static void assertSeparator(String value, int offset, char ch, String type) throws FieldConvertError
FieldConvertError
protected static void throwFieldConvertError(String value, String type) throws FieldConvertError
FieldConvertError
protected static long parseLong(String s)
protected DateFormat createDateFormat(String format)
protected static DateTimeFormatter createDateTimeFormat(String format)
Copyright © 2021. All rights reserved.