Package org.cactoos.time
Class ZonedDateTimeOf
- java.lang.Object
-
- org.cactoos.time.ZonedDateTimeOf
-
- All Implemented Interfaces:
Scalar<ZonedDateTime>
public final class ZonedDateTimeOf extends Object implements Scalar<ZonedDateTime>
Parser forZonedDateTime
instances.- Since:
- 0.27
-
-
Constructor Summary
Constructors Constructor Description ZonedDateTimeOf(CharSequence date)
Parses date to createZonedDateTime
instances.ZonedDateTimeOf(CharSequence date, String format, ZoneId zone)
Parses date using the provided format to createZonedDateTime
instances.ZonedDateTimeOf(CharSequence date, DateTimeFormatter formatter)
Parses the date using the formatter to createZonedDateTime
instances.
-
-
-
Constructor Detail
-
ZonedDateTimeOf
public ZonedDateTimeOf(CharSequence date)
Parses date to createZonedDateTime
instances.- Parameters:
date
- The date to parse.
-
ZonedDateTimeOf
public ZonedDateTimeOf(CharSequence date, String format, ZoneId zone)
Parses date using the provided format to createZonedDateTime
instances.- Parameters:
date
- The date to parse.format
- The format to use.zone
- The zone to use.
-
ZonedDateTimeOf
public ZonedDateTimeOf(CharSequence date, DateTimeFormatter formatter)
Parses the date using the formatter to createZonedDateTime
instances.- Parameters:
date
- The date to parse.formatter
- The formatter to use.
-
-
Method Detail
-
value
public ZonedDateTime value()
Description copied from interface:Scalar
Convert it to the value.- Specified by:
value
in interfaceScalar<ZonedDateTime>
- Returns:
- The value
-
-