This a weird question, but since I\'m really curious about this I wanted to ask. I have a piece of code that works in the iOS Simulator when I enable Remote Debugging but it sto
I had the same problem at first, I thought there might be something wrong within the device. Further digging into it I found it had something to do with the new Date()
library.
I used below piece of code to solve the problem :
convDate(dateStr) {
// From mm-dd-yyyy to yyyy-mm-ddThh:MM:ssZ
var dArr = dateStr.split("-");
return dArr[2] + "-" + dArr[0] + "-" + dArr[1] + "T00:00:00"; //2017-09-13T00:13:28
}
I called the method like this:
const check = new Date(this.convDate(givenDate));