I have a UTC timestamp that I need to compare with the current date. The current date is the date.. not the hour or the second. Just the date
So I need to compare a UTC stamp to that in Javascript. Can anybody help me out?
答案 0 :(得分:0)
The Date type in javascript has the getTime() method witch returns the milliseconds since 1/1/1970. So is you get the time from both dates you can compare them.
var dDate = new Date();
var iMilSecs = dDate.getTime();