date - Javascript method to find number of milliseconds from 1970-01-01? -
this question has reply here:
how timestamp in javascript? 32 answerssay, have date
var dt = new date('2012-01-01');
is there method in javascript homecoming number of milliseconds since 1970-01-01? particulat date homecoming 1325376000000
for purpose, there method "toutc()" runs in chrome only. know because can in chrome's console. see screen attached below:
however, when search method on internet, don't find , doesn't work in firefox either wierd , confused.
anyhow, if know way this, appreciated.
thank you
use gettime function:
var dt = new date('2012-01-01'); var time = dt.gettime();
javascript date timestamp compare utc
No comments:
Post a Comment