Closed MDUK0001 closed 1 year ago
I am wondering if it is because the Iterator method needs nanoseconds adding?
Nanoseconds is not supported. Time will be truncated to second. https://github.com/teambition/rrule-go/blob/master/rrule.go#L936
I see. If nanoseconds isn't supported by DTStart, shouldn't it also not be supported by Between
and other methods?
Yes
Raised a PR, would this work?
It may cause some exceptions on existing application scenarios. I would like to update documents.
If a
time
object with nanoseconds is supplied toRRule.DTStart()
, if we then callRRule.Between()
withinc = true
, the first instance is not returned. However the same query when DTStart does not contain nanoseconds includes the first instance.Sample program:
Output:
The first entry (
2023-01-10 16:07:00 +0000 UTC
) is missing when nanoseconds is supplied.