クラス DateTimeUtils
- java.lang.Object
-
- org.nkjmlab.util.java.time.DateTimeUtils
-
public class DateTimeUtils extends Object
-
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 static DateTimeFormatter
EXCEL_DEFAULT_DATE_FORMATTER
static DateTimeFormatter
GOOGLE_SPREADSHEET_DEFAULT_DATE_FORMATTER
static DateTimeFormatter
GOOGLE_SPREADSHEET_DEFAULT_DATE_TIME_FORMATTER
static DateTimeFormatter
H2_TIMESTAMP_FORMATTTER
static DateTimeFormatter
HYPHENATED_TIMESTAMP_FORMATTTER
static DateTimeFormatter
TIMESTAMP_FORMATTTER
static DateTimeFormatter
UTIL_DATE_FORMATTER
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DateTimeUtils()
-
メソッドの概要
-
-
-
フィールドの詳細
-
EXCEL_DEFAULT_DATE_FORMATTER
public static final DateTimeFormatter EXCEL_DEFAULT_DATE_FORMATTER
-
GOOGLE_SPREADSHEET_DEFAULT_DATE_FORMATTER
public static final DateTimeFormatter GOOGLE_SPREADSHEET_DEFAULT_DATE_FORMATTER
-
GOOGLE_SPREADSHEET_DEFAULT_DATE_TIME_FORMATTER
public static final DateTimeFormatter GOOGLE_SPREADSHEET_DEFAULT_DATE_TIME_FORMATTER
-
H2_TIMESTAMP_FORMATTTER
public static final DateTimeFormatter H2_TIMESTAMP_FORMATTTER
-
TIMESTAMP_FORMATTTER
public static final DateTimeFormatter TIMESTAMP_FORMATTTER
-
HYPHENATED_TIMESTAMP_FORMATTTER
public static final DateTimeFormatter HYPHENATED_TIMESTAMP_FORMATTTER
-
UTIL_DATE_FORMATTER
public static final DateTimeFormatter UTIL_DATE_FORMATTER
-
-
メソッドの詳細
-
parseGoogleSpreadsheetDateString
public static LocalDate parseGoogleSpreadsheetDateString(String date)
- パラメータ:
date
-- 戻り値:
-
parseGoogleSpreadsheetDateTimeString
public static LocalDateTime parseGoogleSpreadsheetDateTimeString(String dateTime)
- パラメータ:
dateTime
-- 戻り値:
-
parseH2TimestampString
public static LocalDateTime parseH2TimestampString(String timestamp)
- パラメータ:
timestamp
-- 戻り値:
-
parseTimestampString
public static LocalDateTime parseTimestampString(String timestamp)
-
parseUtilDateString
public static LocalDateTime parseUtilDateString(String dateTime)
- 戻り値:
-
parse
public static LocalDateTime parse(String format, String datetime)
-
parse
public static LocalDateTime parse(DateTimeFormatter formatter, String timestamp)
-
parseToLocalDate
public static LocalDate parseToLocalDate(DateTimeFormatter formatter, String date)
-
toDate
public static Date toDate(LocalDateTime localDateTime)
-
toZonedDateTime
public static ZonedDateTime toZonedDateTime(LocalDateTime localDateTime)
-
toLocalDateTime
public static LocalDateTime toLocalDateTime(Date date)
-
toLocalDateTime
public static LocalDateTime toLocalDateTime(long epochMilli)
-
toZonedDateTime
public static ZonedDateTime toZonedDateTime(Date date)
-
toTimestamp
public static Timestamp toTimestamp(LocalDateTime date)
-
formatToIsoLocalDateTime
public static String formatToIsoLocalDateTime(LocalDateTime date)
-
formatToHyphenatedTimestamp
public static String formatToHyphenatedTimestamp(LocalDateTime date)
-
nowFormattedAsIsoLocalDateTime
public static String nowFormattedAsIsoLocalDateTime()
-
nowFormattedAsHyphenatedTimestamp
public static String nowFormattedAsHyphenatedTimestamp()
-
getDayOfWeekInJapanese
public static String getDayOfWeekInJapanese(int dayOfWeek)
-
toEpochMilli
public static long toEpochMilli(LocalDateTime localDateTime)
-
-