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