How to check string on date in laravel?
I want to handle the situation if string doesn't date for example like "it's some not date string".
I try it code, but it doesn't work I have next error:
InvalidArgumentException : A two digit month could not be found
Data missing
My code:
if (Carbon::createFromFormat('m-d-Y', $rowMatrix[4]) !== false) {
//
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2F6rq0s
via IFTTT
Aucun commentaire:
Enregistrer un commentaire