I use Angular 5.
I am going to convert string to date.
My code is:
const start_date = '2015-02-03';
const startDate = new Date(start_date);
console.log(startDate);
console.log(startDate.getDate()); // startDate.getDate() is my target
The output of this code is:
Mon Feb 02 2015 19:00:00 GMT-0500 (Eastern Standard Time)
2
But I want to get 3
as a result.
How can I solve this without using Timezone?