bradymholt / cron-expression-descriptor

A .NET library that converts cron expressions into human readable descriptions.
https://bradymholt.github.io/cron-expression-descriptor/
MIT License
1.01k stars 188 forks source link

Can we match the year to Quartz.NET? #175

Closed DaleyKD closed 2 months ago

DaleyKD commented 2 months ago

Quartz.NET only supports up to the year 2099. Is it possible to have the text either use that, or give us an override for max year? That way the descriptor doesn't use "9999".

Thanks for this awesome library.

bradymholt commented 2 months ago

@DaleyKD - I'm not sure I understand. What cron being passed in is being described with "9999" for the year? Can you give me an example?

DaleyKD commented 2 months ago

This is what I came across. Now, whether these are legit cron expressions or not... 🤣

5 45 10 13 6 ? 1981/5 At 10:45:05 AM, on day 13 of the month, only in June, every 5 years, 1981 through 9999 0 0 0 1 1 ? 1981/5 At 12:00 AM, on day 1 of the month, only in January, every 5 years, 1981 through 9999

bradymholt commented 2 months ago

Ah, interesting. And you're passing the actual description into Quartz.NET? Is this causing an error when using Quartz.NET or does it just "not make sense"? I'd welcome a PR for this. Or, you could post-process the message and replace "9999" with "2099" before display on your side.

DaleyKD commented 2 months ago

Oh, I must not have explained well at all.

All I'm saying is that Quartz maxes at 2099. We're using Quartz for other things, and so I was hoping my descriptor would match what their library supports.

If I find time, I may investigate a PR. It's a low priority (since our UI doesn't support any fancy year values).

Just thought I'd point it out.

bradymholt commented 2 months ago

👍 Sounds good.