Package org.ametys.plugins.forms
Class FormDateUtils
java.lang.Object
org.ametys.plugins.forms.FormDateUtils
Forms date utils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ZonedDateTime
asZonedDateTime
(LocalDate date) Converts thisLocalDate
object to aZonedDateTime
.static ZonedDateTime
parseZonedDateTime
(String zonedDateTimeAsString) Parses a String into aZonedDateTime
, using ISO date formatter.static String
zonedDateTimeToString
(ZonedDateTime zonedDateTime) Converts aZonedDateTime
object toString
using the ISO date formatter
-
Method Details
-
asZonedDateTime
Converts thisLocalDate
object to aZonedDateTime
.- Parameters:
date
- the LocalDate- Returns:
- an instant representing the same point on the time-line as this
LocalDate
object
-
zonedDateTimeToString
Converts aZonedDateTime
object toString
using the ISO date formatter- Parameters:
zonedDateTime
- the zoned date time- Returns:
- the zoned date time as a
String
-
parseZonedDateTime
Parses a String into aZonedDateTime
, using ISO date formatter.- Parameters:
zonedDateTimeAsString
- the zoned date time as string- Returns:
- the
ZonedDateTime
object
-