I'm trying to get the start date of a day and the end date. Now to do this I've written this code:
var date_start_temp = $('#calendar').fullCalendar('getView').start;
console.log(date_start_temp)
var date_start = date_start_temp.clone().utc().format("ddd MMM DD YYYY HH:mm:ss");
var date_end = date_start.clone().startOf('day').add(1, 'day').format("ddd MMM DD YYYY HH:mm:ss");
The console.log returns this:
Tue Nov 10 2015 01:00:00 GMT+0100 (ora solare Europa occidentale)
but in the next line I get this error:
date_start_temp.clone(...).utc is not a function
and I don't know why. I just want to get this final result:
date_start
Tue Nov 10 2015 00:00:00
date_end
Wed Nov 11 2015 00:00:00
How you can see I've set the hours to 0 and remove the GMT, I don't want the GMT. How I can achieve this??