bespoke-support/date-guesser

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

1.0.6 2021-10-19 08:34 UTC

This package is auto-updated.

Last update: 2024-12-19 15:43:32 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