Hill, Ronald wrote:
> That would be great! I sure hope you can finish the API
> so I can try it out!!

If you want to try it _before_ we have an API,
you can do it the undocumented way:

Let's say you already have a $sunrise_set and a $sunset_set,
since recurrence-sets are in the DateTime::Set API.

To build a DateTime::SpanSet from two DateTime::Set recurrences:

  my $daylight_span = $sunrise_set->{set}->until( $sunset_set->{set} );
  bless { set => $daylight_span }, DateTime::SpanSet;

Note: "->{set}" is the internal Set::Infinite object, inside a
DateTime::Set object. 
You are not supposed to use it directly (but you can).

Please let me know if it works.
- Flavio S. Glock

Reply via email to