RE: Determine size of a DateTime::SpanSet?

2013-09-04 Thread Metz, Bobby
reas Isberg [mailto:andr...@isberg.se] Sent: Monday, September 02, 2013 3:33 AM To: datetime@perl.org Subject: Determine size of a DateTime::SpanSet? 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 Date

Re: Determine size of a DateTime::SpanSet?

2013-09-04 Thread Flavio S. Glock
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 > 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. >

Determine size of a DateTime::SpanSet?

2013-09-04 Thread Andreas Isberg
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