jamesstill/ScheduleWidget

Need to Support Daily Events That Have No FirstDateTime

Closed this issue · 0 comments

FirstDateTime is necessary evil. In a perfect world an Event object knows nothing about dates; it should know only about temporal expressions and how to describe them. But in v2.2 in order to support bi- tri- or x- weekly events it was added. (If there's a better way to do this I'd like to know about it. One day I'll look into a better way.) For now it should be optional for every other type of event especially the daily events. Khunger has added a pull request with an impressive array of support for different types of events (e.g., "every n number of days"). That pull request is the main reason for v2.3. He modified the DailyEventBuilder to require FirstDateTime. Without it you cannot get back dates from a Schedule Occurrences method. I'm adding back in the older version of this builder to support daily events with a null FirstDateTime so that it is not necessary to give FirstDateTime a value.