On Mon, 31 Mar 2003 [EMAIL PROTECTED] wrote:
> RFC: how to name these parameters to the
> DateTime::SpanSet->new() method:
>
> #1 - Building a SpanSet from
> 2 recurrence callbacks:
>
> $set = new DateTime::SpanSet (
> starting_recurrence_sub => sub { ...... },
> ending_recurrence_sub => sub { ...... },
> );
>
> #2 - Building a SpanSet from
> 2 DateTime::Set recurrences:
>
> $set = new DateTime::SpanSet (
> starting_recurrence_set => $dt_set_start,
> ending_recurrence_set => $dt_set_end,
> );
Looking at this makes me think that instead, there should be multiple
methods, so we'd have:
DateTime::SpanSet->from_recurrences( recurrences => [ \&r1, \&r2 ] );
DateTime::SpanSet->from_sets( sets => [ \&s1, \&s2 ] );
What do others think?
If we go this way, I'd like to see something similar for DateTime::Set, so
we could have DateTime::Set->from_recurrence and DateTime::Set->from_dates
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/