@Immutable public final class PDTIOHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PATTERN_DATE
Date pattern suitable for generic sorting
|
static String |
PATTERN_DATETIME
Date and time pattern suitable for generic sorting
|
static String |
PATTERN_TIME
Time pattern suitable for generic sorting
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getCurrentDateForFilename() |
static String |
getCurrentLocalDateTimeForFilename() |
static String |
getCurrentTimeForFilename() |
static String |
getDateForFilename(LocalDate aLocalDate)
Get the passed date formatted suitable for a file name.
|
static String |
getLocalDateTimeForFilename(LocalDateTime aDT)
Get the passed local date time formatted suitable for a file name.
|
static String |
getTimeForFilename(LocalTime aLocalTime)
Get the passed time formatted suitable for a file name.
|
public static final String PATTERN_DATE
public static final String PATTERN_TIME
public static final String PATTERN_DATETIME
@Nonnull public static String getCurrentLocalDateTimeForFilename()
YYYYMMDD_HHMMSS.@Nonnull public static String getLocalDateTimeForFilename(@Nonnull LocalDateTime aDT)
YYYYMMDD_HHMMSS.aDT - The local date time to be formatted. May not be null.public static String getCurrentDateForFilename()
YYYYMMDD.public static String getDateForFilename(@Nonnull LocalDate aLocalDate)
YYYYMMDD.aLocalDate - The date to be formatted. May not be null.public static String getCurrentTimeForFilename()
HHMMSS.Copyright © 2014–2022 Philip Helger. All rights reserved.