php - Carbon::parse("25/10/1980") throws an error -
i'm facing odd issue, carbon::parse("25/10/1980")
throws following error:
exception message 'datetime::__construct(): failed parse time string (25/12/1980) @ position 0 (2): unexpected character'
while having no problems whatsoever, if month (10) swapped places day (25) this:
carbon::parse("10/25/1980")
how should parse "d/m/y"
string?
try this:
carbon::createfromformat('d/m/y', '25/10/1980')
Comments
Post a Comment