public class DateConverter extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DATE_FORMAT
Date format
|
static String |
DATE_FORMAT2
Non standard Date format
|
static String |
DATETIME_FORMAT
Date Time format
|
static String |
DATETIME_FORMAT2
Secondary Date Time format w/o milliseconds for parsing string dates
|
static String |
FUNCTION_DATE
SQLite date function
|
static String |
FUNCTION_DATETIME
SQLite datetime function
|
static String |
FUNCTION_JULIANDAY
SQLite julianday function
|
static String |
FUNCTION_STRFTIME
SQLite strftime function
|
static String |
FUNCTION_TIME
SQLite time function
|
| Modifier and Type | Method and Description |
|---|---|
static DateConverter |
converter(GeoPackageDataType type)
Get a date converter for the data type
|
static DateConverter |
dateConverter()
Get a date converter
|
static DateConverter |
dateConverter(String... formats)
Get a date converter for the provided formats
|
static DateConverter |
dateTimeConverter()
Get a date time converter
|
Date |
dateValue(String date)
Get the date value of the formatted string date
|
static boolean |
isFunction(String value)
Determine if the date/time string value is a SQLite function
|
String |
stringValue(Date date)
Get the formatted string date value of the date
|
public static final String DATE_FORMAT
public static final String DATE_FORMAT2
public static final String DATETIME_FORMAT
public static final String DATETIME_FORMAT2
public static final String FUNCTION_DATE
public static final String FUNCTION_TIME
public static final String FUNCTION_DATETIME
public static final String FUNCTION_JULIANDAY
public static final String FUNCTION_STRFTIME
public static DateConverter converter(GeoPackageDataType type)
type - data typepublic static DateConverter dateConverter()
public static DateConverter dateTimeConverter()
public static DateConverter dateConverter(String... formats)
formats - formatspublic String stringValue(Date date)
date - datepublic Date dateValue(String date)
date - formatted string datepublic static boolean isFunction(String value)
value - date/time string valueCopyright © 2020 National Geospatial-Intelligence Agency. All rights reserved.