hi Samuel,

Yes, there is a set operation that removes from the set:

   use DateTime;
   use DateTime::Span;
   my $dt1 = DateTime->new(year => 2009, month => 1, day => 12, hour
=> 1, minute => 0, second => 0);
   my $dt2 = DateTime->new(year => 2009, month => 1, day => 12, hour
=> 6, minute => 0, second => 0);
   my $span = DateTime::Span->from_datetimes(start => $dt1, end => $dt2);

   # $span2 is just like $span, but the 'end' is open
   my $span2 = $span->complement($dt2);

complement() is available both in DateTime::Span and DateTime::SpanSet

- Flávio S. Glock

2010/7/13 Samuel DUPOND <samsam...@gmail.com>:
> Hi guys,
>
> I'd like to know if there is a way to set the "start_is_open" &
> "end_is_open" for a DateTime::Span object.
>
> Right now, as a workaround, I have to remove it from a span set, clone the
> removed span object and set the start/after/end/before as I want, and add it
> back to the span set.
>
> Thanks in advance,
>
> Samuel
>

Reply via email to