Open hantsy opened 3 years ago
That's just https://www.php.net/manual/en/datetime.createfromformat.php
Currently I used the following statement to parse a string to LocalDateTime
, it looks a little tedious. Hope there is a method aligned to Java DateTime.
LocalDateTime::fromDateTime(DateTime::createFromFormat('d/m/Y H:i:s', $fromDate))
Relates to https://github.com/brick/date-time/issues/3
In Java 8 DateTime, the
parse
can accept a custom Pattern simply.