public final class DateUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
L_DATE_FORMAT
Date format.
|
static String |
L_DATE_TIME_FORMAT
Date-time format.
|
static String |
L_REPORT_DATE_TIME_FORMAT
Date-time format for report files.
|
| Modifier and Type | Method and Description |
|---|---|
static Date |
copy(Date date) |
static Date |
parseAndComplete(String dateExpression,
boolean upComplete)
Parse string into date, with autocomplete missing month, day, hour, minute and second.
|
static Date |
parseDate(Object value)
Parse date from object
|
static String |
toDateString(Date date)
Get date's String value in format
|
static String |
toDateTimeString(Date date)
Get date's String value in format
|
static <any> |
tryParse(Object value) |
public static final String L_DATE_FORMAT
public static final String L_DATE_TIME_FORMAT
public static final String L_REPORT_DATE_TIME_FORMAT
public static Date parseAndComplete(String dateExpression, boolean upComplete) throws ParseException
dateExpression - string with date expressionupComplete - true if up-complete, otherwise down-completeParseException - if year, month, day, hour, minute or second is invalid or when year is < 1500 or > 2500public static Date parseDate(Object value)
value - object to be parsed. Supported argument types:
IllegalArgumentException - if value is unsupported or has incorrect formatpublic static String toDateString(Date date)
date - date to be formattedpublic static String toDateTimeString(Date date)
date - date to be formattedpublic static <any> tryParse(Object value)
Copyright © 2010-2025 Qcadoo Limited