bespoke-support/date-guesser

Data Guesser (Standard (non-US) format only)

1.0.5 2019-02-25 15:25 UTC

This package is auto-updated.

Last update: 2021-04-25 21:38:17 UTC


README

Allows the creation of a Carbon object when you are unsure of the format presented

$time = '2017-12-31';
// Carbon object
$carbonObj = DateGuesser::create($time);

Allow new formats

DateGuesser::$attemptFormatsAdditional[] = 'd-m-y H:i';
// e.g. 31-12-17 23:59