Skip to content

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

@mikaello

Description

@mikaello

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions