Re: namespace DateTime::BusinessHours

2008-03-15 Thread Flavio S. Glock
2008/3/15, Rick Measham <[EMAIL PROTECTED]>:
>
>  (NOTE for other DT devs: It would be good if, given a DateTime::Set (or
>  DateTime::Set::ICal) you could get the $Nth day .. like the 10th day.
>  rather than an iterator and call it $N times or turning the set into a
>  list (which in this case is infinite))

DateTime::Event::ICal constructor allows to select the Nth occurrence:

  $dtset = DateTime::Event::ICal->new( , bysetpos => [ 10 ] );

"bysetpos" is not in the DateTime::Set API, but the infrastructure is
there (in Set::Infinite):

  $set = $set1->select( by => [ 10 ] );

- Flavio S. Glock


Re: namespace DateTime::BusinessHours

2008-03-14 Thread Rick Measham

Antano Solar wrote:

I was anyways wanting to do a rewrite of the module with also a bug fix that
I encountered.


Take a look at the thread from back on Jan 22 entitled "Sets, 
Recurrences, Public Holidays .. Business Days trouble"


I'm basically solving the same case as you using sets and recurrences 
(and using iCal for subtracting public holidays)


As I'm just needing short runs of days, I'm just looping over the 
$business_days->iterator $days times and then using the final resulting $dt.


(NOTE for other DT devs: It would be good if, given a DateTime::Set (or 
DateTime::Set::ICal) you could get the $Nth day .. like the 10th day. 
rather than an iterator and call it $N times or turning the set into a 
list (which in this case is infinite))


Cheers!
Rick Measham


smime.p7s
Description: S/MIME Cryptographic Signature


Re: namespace DateTime::BusinessHours

2008-03-14 Thread Antano Solar
Sure ,

I was anyways wanting to do a rewrite of the module with also a bug fix that
I encountered.
I will have its NameSpace changed in a week's time , unless you have
suggestions to change the
API and any guidelines to do so.
Thanks .

With Regards

Antano Solar John

On Fri, Mar 14, 2008 at 10:13 PM, Dave Rolsky <[EMAIL PROTECTED]> wrote:

> On Tue, 6 Nov 2007, Antano Solar wrote:
>
> > Kindly also suggest another DateTime name space if  you would prefer it
> to
> > be named anything else within the DateTime namespace.
>
> I think either we should discuss the API first _or_ it should be renamed
> out of the DateTime namespace. Folks are welcome to use DateTimeX:: for
> anything that's DateTime-related but not "blessed" by this list.
>
>
> -dave
>
> /*==
> VegGuide.Org
> Your guide to all that's veg
> ==*/
>


Re: namespace DateTime::BusinessHours

2008-03-14 Thread Dave Rolsky

On Tue, 6 Nov 2007, Antano Solar wrote:


Kindly also suggest another DateTime name space if  you would prefer it to
be named anything else within the DateTime namespace.


I think either we should discuss the API first _or_ it should be renamed 
out of the DateTime namespace. Folks are welcome to use DateTimeX:: for 
anything that's DateTime-related but not "blessed" by this list.



-dave

/*==
VegGuide.Org
Your guide to all that's veg
==*/


namespace DateTime::BusinessHours

2007-11-06 Thread Antano Solar
Hi ,

This module works on two DateTime objects and returns the business hours ,
business days between them. It allows changing all the parameters . Working
hours in  a day . Days which are considered holidays in a week . And a file
which lists all other pre determined holidays. It is well documented using
POD.

Having received a mail from another author , I would like to know is there
anything else that I should do , to have the module named after DateTime and
still not break convention.I am aso ready to not use the DateTime namespace
if that is what you would want me to do.
Kindly also suggest another DateTime name space if  you would prefer it to
be named anything else within the DateTime namespace.

Antano Solar John