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