Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
RunKit + npm: luxon
node v18.11.0
endpoint
share
tweet
const luxon = require("luxon") const clipTime = luxon.DateTime.fromJSDate(new Date('2022-08-25T09:00:00.000-04:00')) const nowTime = luxon.DateTime.fromJSDate(new Date('2022-08-25T09:01:00.000-04:00')) const seconds = nowTime.setZone('UTC').toUnixInteger() - clipTime.setZone('UTC').toUnixInteger() console.log(seconds)
Created from: https://npm.runkit.com/luxon
Loading…
Clone and edit this document