示例代码如下
/**取得此刻时间戳 */
function get_now() {
return parseInt(new Date().getTime() / 1000)
}
/**取得今天00:00:00的时间戳 */
function get_today() {
return new Date(new Date().toDateString()).getTime() / 1000
}
示例代码如下
/**取得此刻时间戳 */
function get_now() {
return parseInt(new Date().getTime() / 1000)
}
/**取得今天00:00:00的时间戳 */
function get_today() {
return new Date(new Date().toDateString()).getTime() / 1000
}