How can I get the Timestamp from a luxon dateTime object?
For example?
const { DateTime } = require("luxon");
date = DateTime.now().setZone('utc');
date.endOf('day);
console.log(date.???) // should give something like 1629399474922
This should be the equivalent to javascript's Date.getTime() function.
The Luxon docs are surprisingly silent on this, but after some digging I finally found it:
date.toMillis();
// or
date.valueOf();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With