Dave Rolsky wrote:
> Why not just offer an explicit to_set method for 
> DateTime::SpanSet, that "does the right thing" 
> (whatever that may be ;)
> 

    # 'the right thing'
    my $start_set = $spanset->to_set;
    # but then:
    my $end_set =
        $spanset->clone->iterate(
            sub { $_[0]->end }
        )->to_set;

    # how about
    my $start_set = $spanset->to_set;
    my $end_set =   $spanset->to_set( 'end' );

- Flavio S. Glock


Reply via email to