I'm trying to realize a system that helps on booking the reservations requests of tennis plygrounds in a tennis club.
Every club has its not-so-simple opening timetable. I want to let user building timetables of any complexity degree, say: with a lot of rules.
So I start handling blocks like: [ :time | time asTime >= '8:30 am' asTime] thinking that they will be called many many times, and many many times will be performed the same parsing of the same string '8:30'.
The way I'm following is using TimeRule objects instead of "raw" BlockCLosures.
TimeRule evaluates the "asTime" value and caches it for late re-use. At the end the "optimization" meant creating specialized objects.
Does anyone know about a library that implements time ranges? Not as Duration's, that occurs at a given time, but ranges that apply to any time (i.e. from January to June from 8:30 am to 5 pm but from June to December from 9 am to 10 pm).
beginners@lists.squeakfoundation.org