Open cmoses1020 opened 4 years ago
$alternateFormat in to_carbon helper is used too late in the method and will sometimes be missed completely.
$alternateFormat
to_carbon
The date format m/d/Y comes out wrong when being passed to to_carbon because of this
m/d/Y
to_carbon('06/02/2000', 'm/d/Y')->format('m/d/Y'); // outputs 02/06/2000
$value is caught by line 947
$value
// Try to convert it using strtotime(). if (($date = strtotime($value)) !== false) { return Carbon\Carbon::createFromTimestamp($date); }
If $alternateFormat is used i believe createFromFormat() should come sooner in this method.
createFromFormat()
$alternateFormat
into_carbon
helper is used too late in the method and will sometimes be missed completely.The date format
m/d/Y
comes out wrong when being passed toto_carbon
because of this$value
is caught by line 947If
$alternateFormat
is used i believecreateFromFormat()
should come sooner in this method.