不寻找特定环境的日期方法,例如 this 用于计算这些日期字段,但是您如何将它们与unix时间戳(例如现在)隔离,是 1650045773120
?从1970年1月1日起,它是在UTC的毫秒内,但我不确定如何进行转换以隔离这些值。如果有源代码的链接已经显示了该实现,那也可以起作用。
const start = new Date(0)
const now = Date.now()
这似乎是相当复杂的,因此想知道Jodatime或JavaScript date
如何在引擎盖下实现此操作,也许是源代码所在的位置。除非您知道如何直接做。
Not looking for the environment-specific date methods like this for calculating these date fields, but how do you isolate them from a Unix timestamp such as now, which was 1650045773120
? It is in milliseconds from Jan 1 1970 UTC, but I'm not sure how to do the conversion to isolate these values. If there are links to source code which already show the implementation, that would work too.
const start = new Date(0)
const now = Date.now()
This seems like it will be fairly complex, so wondering how JodaTime or the JavaScript Date
implement this under the hood, and perhaps where the source code is. Unless you know how to do it directly.
发布评论