Re: Determine size of a DateTime::SpanSet?

[email protected] ("Flavio S. Glock") Wed, 4 Sep 2013 20:16:32 +0200
Newsgroups perl.datetime
Message-ID <CAHMRfDye8z9qTqBjWYMBigxA5C1=JmmkvxUVR0_-gHNhZp1prQ@mail.gmail.com>
You can use as_list() to transform the SpanSet into a list of Spans, and
then count the Spans:

  print "number of spans: ", scalar($s1->as_list);


2013/9/2 Andreas Isberg <[email protected]>

> Hi,
>
> I'm looking for a way to find the size of a DateTime::SpanSet, i.e. the
> number of DateTime:Span objects in it.
>
> I'm not looking for a DateTime::Duration object, as the size() method
> returns.
>
> Kind regards,
> Andreas
>
>