On Thu, 20 Mar 2003, fglock wrote:

> DateTime::Span - a time-span
>
>   # A 'closed' span includes its end-dates:
>   $dates = DateTime::Span->new( start => $dt1, end => $dt2 );
>
>   # An 'open' span does not include its end-dates:
>   $dates = DateTime::Span->new( after => $dt1, before => $dt2 );
>
>   # A 'half-open' span includes one of its end-dates:
>   $dates = DateTime::Span->new( start => $dt1, before => $dt2 );
>   $dates = DateTime::Span->new( after => $dt1, end => $dt2 );
>
>   # A span might have just a begin date, or just an end date.
>   # These spans end, or start, in an imaginary 'forever' date:
>   $dates = DateTime::Span->new( start => $dt1 );
>   $dates = DateTime::Span->new( end => $dt2 );

This looks really good.

> DateTime::SpanSet - set of time-spans
>
>   # from a DateTime::Span
>   $dt_spanset = DateTime::SpanSet->new( span => $dt_span );

Ok.  Not that interesting, but logical ;)

>   # from a DateTime::Set
>   $dt_spanset = DateTime::SpanSet->new( set => $dt_set );

I don't understand what this represents?  How could a set of discrete
datetimes also be a set of spans?

>   # the union of 2 spans gives a spanset:
>   $dt_spanset = $dt_span->union( $dt_span2 );

Sure

>   For discussion: some other possibilities (not implemented) are:
>
>   # from an array of DateTime::Span's
>   $set1 = DateTime::SpanSet->new( spans => [ $dt_span, $dt_span ] );

I think this is necessary.

>   # from two DateTime::Set's - can be used to create a span-recurrence
>   $set1 = DateTime::SpanSet->new( start_set => $dt_set, end_set => $dt_set );

What would this create exactly?

For example, if I have two sets, one of which is an infinite recurrence
every month starting on January 1, 2002, and the other is a set with 2
datetimes, one of which is December 22, 1758 and the other is December 12,
2004?


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to