rrule
rrule copied to clipboard
Set<int> byHours,Set<int> bySeconds use List<int> instead would be better
E.g.
repeat every day at 08:00, 09:23, 09:50, 10:23 (these times input by the user, could be totally random)
Set Example
if use Set
- 08:00 ← 1
- 08:23
- 08:50
- 09:00
- 09:23 ← 5
- 09:50 ← 6
- 10:00
- 10:23
- 10:50 ← 9
- ....
In this case, setting bysetpos to 1,5,6,9 will get the correct result, but this is impossible to implement by code because the information of byMinutes has been lost and the user's input could be totally random.
List Example
if use List
- 08:00 ← 1 = 0 * byMinutes.length + 1
- 08:23
- 08:50
- 08:23
- 09:00
- 09:23 ← 6 = 1 * byMinutes.length + 1
- 09:50
- 09:23
- 09:00
- 09:23
- 09:50 ←11 = 2 * byMinutes.length + 1
- 09:23
- 10:00
- 10:23
- 10:50
- 10:23 ←16 = 3 * byMinutes.length + 1
- ...
In this case, setting bysetpos to 1,6,11,16 will get the correct result, and it's easy to implement by code because =there is a pattern in bysetpos: index * byMinutes.length + 1