Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failing - something wrong with Date object passed to cron library #26

Open
mikaello opened this issue Jul 18, 2022 · 0 comments
Open
Labels
help wanted Extra attention is needed

Comments

@mikaello
Copy link
Owner

When the dates are sent to CronJob.make, they are not interpreted as Date in node-cron library, typeof <rescript-date> shows Object.

I don't know what is wrong, it seems like #JsDate(Js.Date.fromString(futureDate) does not result in a real Date, but something else.

Nevertheless, cron has advanced and is no longer using Moment, but have changed to Luxon, so this library probably needs a rewrite.

Looking at the TypeScript types could be of help: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/cron/index.d.ts

Unfortunately is the only ReScript/BuckleScript Luxon library I could find a bit outdated: https://github.com/davidgomes/bs-luxon

@mikaello mikaello added the help wanted Extra attention is needed label Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant