cuu508
9 months ago
Looks well done. I like how the docs describe every syntax feature, and every non-standard feature in detail. Hat tip to implementing Vixie's "*,10" quirk, and to handling DST.
tison
9 months ago
You're welcome! As described in the "Why do you create this crate?" section, I actually started this domain only a few weeks ago. So I experienced how those tribal rules can be confusing and hard to search over the Internet the understand their semantic.
And when I sorted out the parse structure [1] and finished the extensions [2][3], I believe I should write it down for others (and future me) :D
[1] https://github.com/tisonkun/cronexpr/pull/4
vlovich123
9 months ago
Is there a comparison to other cron parsing libraries like Saffron?
tison
9 months ago
Croner has a table for the syntax supported by it and saffron [1], you can compare it with the one cronexpr supported.
[1] https://github.com/hexagon/croner-rust?tab=readme-ov-file#wh...
As supported in [2],
> There are several good candidates like croner and saffron, but they are not suitable for my use case. Both of them do not support defining timezone in the expression which is essential to my use case. Although croner support specific timezone later when matching, the user experience is quite different. Also, the syntax that croner or saffron supports is subtly different from my demand. > > Other libraries are unmaintained or immature to use. > > Last, most candidates using chrono to processing datetime, while I’d prefer to extend the jiff ecosystem.
[2] https://docs.rs/cronexpr/latest/cronexpr/#why-do-you-create-...