I'm pulling some data from two different APIs and I want to the objects later on.
However, I'm getting two different date formats: this format "1427457730" and this format "2015-04-10T09:12:22Z". How can I change the format of one of these so I have the same format to work with?
$.each(object, function(index) {
date = object[index].updated_at;
}
es5-shimto ensure that the environment handlestoISOStringthendate = (/^\d+$/).test(d) ? new Date(d * 1000).toISOString().slice(0, -5) + 'Z': d;wheredisobject[index].updated_atNow all formats will be like"2015-04-10T09:12:22Z"