I would not be opposed, but I think we should let the FAQ settle a bit
before rolling stuff into the core.

Some of the items are really the DT::Business that Dave mentioned
earlier.

Perhaps others belong in DT itself or in DT::Calc.

One reason that I sort of think the latter is that you want to be able
to define what a week is.  You may be using the ISO week (which may be
in a different year) or a different start day for the week (e.g. Saudi
Arabia has the weekend on Friday and Saturday, I dunno if that is
common in other Islamic countries).  So you need a way to set that
calculation wide, so you may need to do something like:

use DT::Calc qw(:constants);

my $calc = DT::Calc->new(week_starts_with => MONDAY);
$calc->get_day_in_same_week($dt, THURSDAY);

or somesuch.  The sub names are pretty ugly so I am open to
suggestions for better ones.

                         -ben


On Fri, May 30, 2003 at 01:46:57PM -0500, Dave Rolsky wrote:
> On Fri, 30 May 2003, Dan Sully wrote:
> 
> > * Ben Bennett <[EMAIL PROTECTED]> shaped the electrons to say...
> >
> > > I have a (very) rough draft of a faq available at:
> > >   http://www.limey.net/~fiji/perl/
> >
> > Ben - I like the FAQ a lot. A suggestion though - you offer quite a few
> > functions that do useful things, ie: get_day_in_same_week, etc.
> >
> > It'd be useful (to me at least) if those made it into a DateTime::Helpers or 
> > somesuch.
> 
> Or maybe just into the core.  I'm open to adding more methods, as long as
> they provide something useful that people would otherwise end up
> re-implementing in their own code.
> 
> 
> -dave
> 
> /*=======================
> House Absolute Consulting
> www.houseabsolute.com
> =======================*/

Reply via email to