public class DateNumber extends Object
Bi-directional conversion of dates to numbers supports the following formats * date8 - yyyyMMdd * datetime14 - yyyyMMddHHmmss * datetime17 - yyyyMMddHHmmssSSS * time6 - HHmmss * time9 - HHmmssSSS All of the above date formats are supported for half-angle conversion when parsing.
DateParser| Modifier | Constructor and Description |
|---|---|
protected |
DateNumber() |
| Modifier and Type | Method and Description |
|---|---|
static int |
date8(@NotNull LocalDate date)
convert to yyyyMMdd
|
static int |
date8(@NotNull LocalDateTime date)
convert to yyyyMMdd
|
static int |
date8(@NotNull ZonedDateTime date)
convert to yyyyMMdd
|
static long |
dateTime14(@NotNull LocalDateTime date)
convert to yyyyMMddHHmmss
|
static long |
dateTime14(@NotNull ZonedDateTime date)
convert to yyyyMMddHHmmss
|
static long |
dateTime17(@NotNull LocalDateTime date)
convert to yyyyMMddHHmmssSSS
|
static long |
dateTime17(@NotNull ZonedDateTime date)
convert to yyyyMMddHHmmssSSS
|
static @NotNull LocalDate |
parseDate(long num)
convert any number with date information to a date
|
static @NotNull LocalDate |
parseDate(long num,
int off)
from the offset to convert any number with date information to a date
|
static @NotNull LocalDateTime |
parseDateTime(long num)
convert any number with date information to a date
|
static @NotNull LocalDateTime |
parseDateTime(long num,
int off)
from the offset to convert any number with date information to a date
|
static @NotNull LocalTime |
parseTime(long num)
convert any number with date information to a date
|
static @NotNull LocalTime |
parseTime(long num,
int off)
from the offset to convert any number with date information to a date
|
static int |
time6(@NotNull LocalDateTime date)
convert to HHmmss
|
static int |
time6(@NotNull LocalTime date)
convert to HHmmss
|
static int |
time6(@NotNull ZonedDateTime date)
convert to HHmmss
|
static int |
time9(@NotNull LocalDateTime date)
convert to HHmmssSSS
|
static int |
time9(@NotNull LocalTime date)
convert to HHmmssSSS
|
static int |
time9(@NotNull ZonedDateTime date)
convert to HHmmssSSS
|
public static int date8(@NotNull
@NotNull LocalDate date)
public static int date8(@NotNull
@NotNull LocalDateTime date)
public static int date8(@NotNull
@NotNull ZonedDateTime date)
public static long dateTime14(@NotNull
@NotNull LocalDateTime date)
public static long dateTime14(@NotNull
@NotNull ZonedDateTime date)
public static long dateTime17(@NotNull
@NotNull LocalDateTime date)
public static long dateTime17(@NotNull
@NotNull ZonedDateTime date)
public static int time6(@NotNull
@NotNull LocalTime date)
public static int time6(@NotNull
@NotNull LocalDateTime date)
public static int time6(@NotNull
@NotNull ZonedDateTime date)
public static int time9(@NotNull
@NotNull LocalTime date)
public static int time9(@NotNull
@NotNull LocalDateTime date)
public static int time9(@NotNull
@NotNull ZonedDateTime date)
@NotNull public static @NotNull LocalTime parseTime(long num)
@NotNull public static @NotNull LocalDate parseDate(long num)
@NotNull public static @NotNull LocalDateTime parseDateTime(long num)
@NotNull public static @NotNull LocalTime parseTime(long num, int off)
@NotNull public static @NotNull LocalDate parseDate(long num, int off)
@NotNull public static @NotNull LocalDateTime parseDateTime(long num, int off)
Copyright © 2023. All rights reserved.