Reputation: 7235
I'm facing an odd issue, Carbon::parse("25/10/1980")
throws the following error:
Exception with message 'DateTime::__construct(): Failed to parse time string (25/12/1980) at position 0 (2): Unexpected character'
While having no problems whatsoever, if month (10) is swapped places with day (25) like this:
Carbon::parse("10/25/1980")
How should I parse the "d/m/Y"
string?
Upvotes: 0
Views: 3941
Reputation: 3487
This also works (dashes, not slashes)
Carbon::parse ('25-10-1980');
Upvotes: 3