教程 dayjs tutorial

Unix 时间戳

返回当前实例的 UNIX 时间戳,10 位数字,秒。

javascript
dayjs("2019-01-25").unix(); // 1548381600

此值不包含毫秒信息,会进位到秒。