public class DateUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DateUtils.TrippleString |
Modifier and Type | Field and Description |
---|---|
static java.time.format.DateTimeFormatter |
TIME_FORMAT |
static java.time.format.DateTimeFormatter |
TIME_FORMAT_WITH_MILIS |
static java.time.format.DateTimeFormatter |
TIME_FORMAT_WITH_SECONDS |
Constructor and Description |
---|
DateUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
format(java.time.LocalDate date) |
static String |
format(String value) |
static String |
formatXsd(Date date) |
static boolean |
germanDateStyle() |
static java.time.format.DateTimeFormatter |
getDateTimeFormatter() |
static java.time.format.DateTimeFormatter |
getTimeFormatter(PropertyInterface property) |
static int |
getTimeSize(PropertyInterface property) |
static java.time.LocalDate |
parse_(String date) |
static java.time.LocalDate |
parse(String date)
Tries to be a little bit more clever than the normal parsing.
|
static String |
parseCH(String inputText,
boolean partialAllowed)
Converts a CH - Date String in a yyyy-mm-dd String.
|
static Date |
parseXsd(String xmlDateTime) |
public static final java.time.format.DateTimeFormatter TIME_FORMAT
public static final java.time.format.DateTimeFormatter TIME_FORMAT_WITH_SECONDS
public static final java.time.format.DateTimeFormatter TIME_FORMAT_WITH_MILIS
public static java.time.format.DateTimeFormatter getDateTimeFormatter()
public static String parseCH(String inputText, boolean partialAllowed)
inputText
- The input text. Maybe empty or null
.partialAllowed
- false if the inputText has to be a complete date with month and daynull
or length 0). An empty String
if the input text doesn't fit a date or a String in format yyyy-mm-dd (or yyyy-mm or even
yyyy if partial allowed)public static String format(java.time.LocalDate date)
date
- a local date or null
public static java.time.LocalDate parse(String date)
date
- date as a String or null
null
public static java.time.LocalDate parse_(String date)
public static boolean germanDateStyle()
public static String format(String value)
value
- date in format yyyy-mm-ddpublic static Date parseXsd(String xmlDateTime) throws ParseException
ParseException
public static int getTimeSize(PropertyInterface property)
public static java.time.format.DateTimeFormatter getTimeFormatter(PropertyInterface property)
Copyright © 2019. All rights reserved.