Closed KatrinaHoffert closed 5 years ago
In hindsight, it felt obvious we should prevent BYSECOND=60
, given that it has the ability to cause serious issues. A future issue should try to fix whatever is making it loop indefinitely, but that's beyond the scope of this PR.
@KatrinaHoffert Thank you.
Per the RFC, many fields have limits that were not being checked (except Bysetpos, for whatever reason). This can result in user error not being caught early and also prevents you from using this library to catch said errors.
As well, FREQ is required by the RFC and if it wasn't specified, we would badly assume some default. For these bounds in the standard, see: https://tools.ietf.org/html/rfc5545#section-3.3.10
Note: it turns out we don't handle leap seconds right (they're why seconds go to 60 and not 59). In fact, when I tried to write a test with
BYSECOND=60
, it was an infinite loop. Not sure if the bounds should be restricted below the RFC as a result (I mean, who would honestly use leap seconds in a RRule, anyway?).