THE SITUATION:
Inside the controller i need to get the current date in order to compare it with other data.
The code is pretty simple:
var today = new Date();
In this way i get the current date in this exact format:
2015-12-24T12:03:58.170Z
I need to format it in order to keep only year-month-day (yyyy-MM-dd)
I know how to format the date in the view but i don't know how to do it inside the controller.
THE QUESTION:
How can i format the current date inside the controller?
Thank you!