Reputation: 602
how do I convert a LocalDateTime Object from the @js-joda/core library to a standard JavaScript Date object?
Upvotes: 3
Views: 3200
Reputation: 602
As @RobG mentioned in a comment import convert from '@js-joda/core' and you can use let date = convert(ZonedDateTime.now()).toDate();
to get a js date
Upvotes: 3