Modifier and Type | Method and Description |
---|---|
static Double |
convertDate(Date date)
Convert a
Date to a serial number. |
static Double |
convertDate(LocalDate date)
Convert a
LocalDate to a serial number. |
static Double |
convertZonedDateTime(ChronoZonedDateTime zdt)
Convert a
ChronoZonedDateTime to a serial number. |
public static Double convertDate(Date date)
Date
to a serial number. Note Excel timestamps do not
carry any timezone information; this method uses the system timezone to
convert the timestamp to a serial number. If you need a specific
timezone, prefer using
convertZonedDateTime(java.time.chrono.ChronoZonedDateTime)
.date
- Date value.public static Double convertDate(LocalDate date)
LocalDate
to a serial number.date
- Local date value.public static Double convertZonedDateTime(ChronoZonedDateTime zdt)
ChronoZonedDateTime
to a serial number.zdt
- Date and timezone values.Copyright © 2019. All rights reserved.