On Thu, 6 Mar 2003, fglock wrote:
> What about this (see my other e-mail):
>
> $days = DateTime::Set->new( recurrence => sub { $_[0]->add( days => 1
> ) },
> start => NEG_INFINITY,
> );
Show me how this would be used.
> (as I see it, we _do_ need 'truncation' in order to solve this)
I'm happy to add this to DateTime.pm, but I don't see why it'd need to be
part of the iterator or set objects.
> > my $set = DateTime::Set->new( start => $beginning_of_month,
> > end => $end_of_month,
> > );
>
> Don't forget we might have open-sets and half-open sets.
> But that's a matter of choosing proper parameter names.
Yeah, that's pretty simple.
> DateTime::Set
> - single dates
> - list of dates
> - recurrences
> - infinity value
> - empty set
>
> DateTime::Span
> - start = x && x = end # a single date
> - start > x && x < end
> - start >= x && x < end
> - start > x && x <= end
> - start >= x && x <= end
> - empty set
> note: start/end can both be the infinity value.
>
> DateTime::SpanSet
> - list of spans
> - recurrence of spans
> - ...
That looks right to me.
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/