Closed Ellathet closed 1 year ago
This seems like a pretty niche use-case to me, especially because there is no 1:1 match between CRON and any Luxon object. CRON describes a recurring schedule, none of the Luxon objects do this.
Additionally, there is no formatting option for everything imaginable, and neither does there need to be, in my opinion. Your dateToCron
function is something that can perfectly well live in user code and doesn't need to be in Luxon.
Yeah, I think we'll pass on a cron feature for the the reasons @diesieben07 states
However, what we probably should add is a token for weekday number. So we'd take a PR for that. Feel free to open a new issue about that.
Hi, I've tried to format the DateTime of CRON syntax, to run a scheduler in nestjs, but only found this solution:
I din't like this soluction, because i need implement a new function. I tried use a
.toFormat
function, but I don't no to get a weekday.This, ?? should be a week day, like a CRON syntax
If don't have that option, I can try to implement getting the day of the week by the parser, with PR.