I'm having a hard time conceiving an object model that can store time periods like the following:
"Any Wednesday from 2:00PM to 3:00PM"
"April 1, 2010"
"All April for any year"
"Any day in April from 2:00PM to 3:00PM for any year"
"Any day 1:30PM to 2:00PM"
"Any April 1 to Any April 3"
Sometimes the period will be for a specific date, other times it will be for a day of the week plus a time span. Maybe a whole month.
Testing a given DateTime against the model is a seperate problem I will have to solve later. Is there a way to model this idea in POCOs? I'm drawing a blank.
I'm not looking for a set of DateTimes representing two distinct points in time. I'm looking for a structure that will store the same sorts of time periods you'd use to create a cell phone calling plan or a shift rotation.