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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -