I have a problem, I pass a date in d / m / Y format to Vue from Laravel and I want to increase it by one month, but when I try to do:
From laravel send it as a JSON collection:
'date' => date ('d/m/Y', strtotime ($row->date)),
03/08/2020
In Vue:
let nextdate = new Date(date);
I get the day and the month reversed.
Sun Mar 08 2020 00:00:00 GMT-0500 (Peru standard time)
It should come out, August 3, 2020.
Date(string)constructor relies onDate.parse(string)which considers mainly ISO format such as 2020-08-03? Otherwise, you have to manually parse the API response.