I am beginner. I would like to compare iPhone device Date with my Persian Date Logic. So, my Date() Function not working on Iphone. I would like to this normal Date() function fetch iPhone current system date/time. Any function to get iPhone Device Date()? My code is below. Thanks for helping me in advance.
function _compareDate(dateString) {
var selectedDate = new Date(dateString);
console.log(selectedDate);
var now = new Date();
if (selectedDate < now) {
return false;
} else {
return true;
}
}
My Now Date Returns: Fri Feb 03 2017 00:00:00 GMT+0530 (India Standard Time)