in reply to Re^2: Determine if a given DateTime is a member of a DateTime::Set
in thread Determine if a given DateTime is a member of a DateTime::Set
DateTime::Set is fine to use, but calendar math has these mysterious details, and recurrence specifications are particularly hard.
The specialised "DateTime::Event" subclasses can make life easier. DateTime::Event::Sunrise and DateTime::Event::Cron are other nice examples.
About the endpoint that makes it work: when both endpoints of the set are known, it triggers an optimisation that pre-calculates the whole set. The internal representation then changes to a list. This "fixes" the problem, because no further recurrence math is involved.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Determine if a given DateTime is a member of a DateTime::Set
by vagabonding electron (Curate) on May 16, 2013 at 17:05 UTC |
In Section
Seekers of Perl Wisdom