MomentJS - Unix 時間戳(秒)



此方法提供了從 Unix 紀元起以來的秒數。

語法

moment().unix();

示例

var a = moment().unix();

輸出

Unix Timestamp (seconds)

此值被取整到最近的秒,不包括毫秒部分。

momentjs_formatting_date_and_time.htm
廣告
© . All rights reserved.