Fixed a bug in Event.CanProduceOccurrences()

Fixed a bug in Event.CanProduceOccurrences().
A couple utility functions were added to the DateRange class.