On 2003-10-03 Dave Rolsky wrote:
>I see us needing a couple things: - Recording the fact that certain
>days are special non-work days. This includes both public holidays,
>company holidays, one shot things like "fumigating the building", etc.
> We not only want to record when these are, but their names
>("Christmas", "Company Founder's B-Day", "Fumigation Day", etc.) and
>possibly other arbitrary data associated >with them.
But this should really be kept to a minimum imo, perhaps just one
additional field for a key to look up the associated data somewhere
else. Individual days might collect several layers of special
information. And whatever approach is used, we need to be able to look
things up both ways, i.e., by the date and by the special datum. Otherwise Fumigation
Day could get scheduled for Founder's B-Day.
In some of my production calendars, each day has 30 or 40 pieces of
associated information, so I use date methods to derive the set of
dates, then create a table -- in memory or database -- with the dates
as primary keys. When the layout program calls for a date, it gets an
object with all that date's info plus self-awareness of its place in
the set. From this perspective, I wouldn't need DateTime::Business to do much besides
provide the sets or spans, plus the math.
I suppose DT::Biz could provide an API for populating the individual date objects,
which would then inherit DT::Biz math etc methods; maybe this is what you meant. My
caution is just to keep in mind that the associated data can multiply, and a structure
that incorporates the associated data for a whole set of dates/times could get large.
Dave also said in response to some advance thinking by Rick:
>The first thing we need is a "business calendar" module that lets us
>define standard work days/hours, days off, and partial days.
>
>It should also be able to do calculations like, tell us how many
>business days occur between two dates, how many business hours/minutes
>occur between two datetimes, and generally let us do "business
>datetime math".
>
>Then we can use that module in another module that implements the
>per-employee stuff you're interested in.
Dave++
And Flavio said in anther message:
>How about trying to figure out a rough DateTime::Business::* directory
>structure? It would also help other authors to find out where to put
>their modules.
Flavio++
- Bruce
__bruce__van_allen__santa_cruz__ca__