Class Dates
java.lang.Object
org.emau.icmvc.ganimed.ttp.cm2.util.Dates
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LocalDate
atStartOfDay
(LocalDate localDate) Returns the specified local date at the start of its day w.r.t. the system's default zone.static LocalDate
atStartOfDay
(Date date) Returns the specified date at the start of its day w.r.t. the system's default zone.static boolean
isFutureDay
(LocalDate localDate) Returns true if the specified local date refers to a day in the future w.r.t. the system's default zone.static boolean
isFutureDay
(Date date) Returns true if the specified date refers to a day in the future w.r.t. the system's default zone.static Date
Converts the specified local date into a date w.r.t. the system's default zone.static LocalDate
today()
Returns a local date w.r.t. the system's default zone which refers to today.static LocalDate
toLocalDate
(Date date) Converts the specified date into a local date w.r.t. the system's default zone.static LocalDate
tomorrow()
Returns a local date w.r.t. the system's default zone which refers to tomorrow.
-
Field Details
-
SYSTEM_ZONE_ID
-
-
Constructor Details
-
Dates
public Dates()
-
-
Method Details
-
atStartOfDay
Returns the specified date at the start of its day w.r.t. the system's default zone.- Parameters:
date
- the instant to shift to the start of its day- Returns:
- local date at the start of the day
-
atStartOfDay
Returns the specified local date at the start of its day w.r.t. the system's default zone.- Parameters:
localDate
- the local date to shift to the start of its day- Returns:
- local date at the start of the day
-
today
Returns a local date w.r.t. the system's default zone which refers to today.- Returns:
- a local date w.r.t. the system's default zone which refers to today
-
tomorrow
Returns a local date w.r.t. the system's default zone which refers to tomorrow.- Returns:
- a local date w.r.t. the system's default zone which refers to tomorrow
-
toDate
Converts the specified local date into a date w.r.t. the system's default zone.- Parameters:
localDate
- the local date to convert- Returns:
- a date w.r.t. the system's default zone
-
toLocalDate
Converts the specified date into a local date w.r.t. the system's default zone.- Parameters:
date
- the date to convert- Returns:
- a local date w.r.t. the system's default zone
-
isFutureDay
Returns true if the specified date refers to a day in the future w.r.t. the system's default zone.- Parameters:
date
- the date to check- Returns:
- true if the specified date refers to a day in the future
-
isFutureDay
Returns true if the specified local date refers to a day in the future w.r.t. the system's default zone.- Parameters:
localDate
- the local date to check- Returns:
- true if the specified local date refers to a day in the future
-