I looked through the documentation but I don't think I've found an option to simply create a DateTime object from a numerical timestamp, the representation that DateTime uses internally. I am using a Web Worker which passes messages to the main thread that include DateTimes, but the DateTime 'type' of the object is stripped when it's passed back to the main thread, so it lacks the prototype methods.
Of course, I can probably work around by converting DateTimes to a more serializable format when passing the data back, but I do still wonder if not having the option to create a date from a timestamp is intentional or oversight.
Never mind, I simply had to search better, it is fromMillis.
Most helpful comment
Never mind, I simply had to search better, it is
fromMillis.