public static enum DateUtil.Format extends Enum<DateUtil.Format>
| Enum Constant and Description |
|---|
HL7 |
HL7_WITHOUT_TIME |
JS_WITH_TZ |
JS_WITHOUT_TIME |
JS_WITHOUT_TZ |
TO_STRING |
WITH_TZ |
WITHOUT_DATE |
WITHOUT_TIME |
WITHOUT_TZ |
| Modifier and Type | Method and Description |
|---|---|
String |
formatDate(Date date)
Formats an input date.
|
String |
formatDate(Temporal date) |
String |
getPattern()
Returns the format pattern.
|
Date |
parseAsDate(String value)
Parses an input value.
|
LocalDate |
parseAsLocalDate(String value)
Parses an input value.
|
LocalDateTime |
parseAsLocalDateTime(String value)
Parses an input value.
|
OffsetDateTime |
parseAsOffsetDateTime(String value)
Parses an input value.
|
static DateUtil.Format |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DateUtil.Format[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DateUtil.Format WITH_TZ
public static final DateUtil.Format WITHOUT_TZ
public static final DateUtil.Format WITHOUT_TIME
public static final DateUtil.Format WITHOUT_DATE
public static final DateUtil.Format HL7
public static final DateUtil.Format HL7_WITHOUT_TIME
public static final DateUtil.Format JS_WITH_TZ
public static final DateUtil.Format JS_WITHOUT_TZ
public static final DateUtil.Format JS_WITHOUT_TIME
public static final DateUtil.Format TO_STRING
public static DateUtil.Format[] values()
for (DateUtil.Format c : DateUtil.Format.values()) System.out.println(c);
public static DateUtil.Format valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getPattern()
public String formatDate(Date date)
date - The date to format.public Date parseAsDate(String value) throws ParseException
value - The value to parse.ParseException - Date parsing exception.public LocalDate parseAsLocalDate(String value) throws ParseException
value - The value to parse.ParseException - Date parsing exception.public LocalDateTime parseAsLocalDateTime(String value) throws ParseException
value - The value to parse.ParseException - Date parsing exception.public OffsetDateTime parseAsOffsetDateTime(String value) throws ParseException
value - The value to parse.ParseException - Date parsing exception.Copyright © 2023 Fujion Framework. All rights reserved.