On Thursday, June 5, 2003, at 01:38 PM, Ben Bennett wrote:
Very interesting post.
On Thu, Jun 05, 2003 at 01:32:14PM -0700, Brad Hughes wrote:
Ben Bennett wrote:
Okay so what should a business date module be able to do?
What is a "business day?"
A quick glance at our internal date modules reveals over 40 different
"business day" calendars.  You've got, for example, the NYSE, NASDAQ,
[snip]

1. This is one reason some us have argued for the capability of caching recurrence sets (which Flavio implemented!). Brad suggests another way to accomplish this, which would have application in some uses:
In any case, my suggestion is, for each calendar, take a scalar where
  1) each bit represents a calendar day, starting from some start date
     (data is available for the NYSE going back to 1885, when the NYSE
     had a special closing for the funeral of Ulysses S. Grant);
  2) a bit is 1 if that day is a valid day for that calendar;
  3) the scalar is uuencoded and stuck in a __DATA__ section.

For functional calendars dedicated to specific uses, 3) is similar to what I've done, with my main module building a new module that drops any claim to universality, and stores its set of dates and their specialized attributes under __DATA__ (and has a method to extend the set if necessary).


2. Another aspect of business calendars concerns contract and billing periods, giving rise to 30-day months, discount schedules, and the like, many of which involve date-related terms of trade. A while ago I thought I'd get time to go through a bunch of documents and make a list of such commonly used items, but work grabbed all my tuits.

3. A related area is work-time rules, covering pay periods, breaks, overtime, comp time, accrual of benefits, etc. These are implemented within firms and industries, so would benefit from tools allowing pre-construction of DT sets according to rule sets. Any HR or Accounting Dept programmers out there?

- Bruce

__bruce__van_allen__santa_cruz__ca__



Reply via email to