> does that mean most functions in DateHelper need to return either one or two dates?
Probably not:
If you have the setting on both, we can just return the first occurrence. When we look for the next candidate date, we should automatically reach the later occurrence.
So the logic could be something like this:
if result ambiguous and setting is earlier: return earlier
if result ambiguous and setting is later: return later
if result ambiguous and setting is both: return earlier or later depending on adjusted
Probably not:
If you have the setting on both, we can just return the first occurrence. When we look for the next candidate date, we should automatically reach the later occurrence.
So the logic could be something like this:
earlier
: return earlierlater
: return laterboth
: return earlier or later depending onadjusted
Originally posted by @maennchen in https://github.com/maennchen/crontab/issues/129#issuecomment-1940457081
Needed for https://github.com/quantum-elixir/quantum-core/issues/407