Yes, $recur->parse() only parses the recurrence string, it's $recur->dates() that returns the list of dates. What I don't understand is why it isn't in my case. Clearly it worked for you.
When I try to replicate your code example, I get something new! I'm getting a list, but instead of a list of strings it's a list of hashes...
#!/usr/bin/perl use strict; use warnings; use Date::Manip; print "Content-type: text/html \n\n"; print "Starting....<p>"; my $freq = "0:1:0*25:0:0:0"; my $mod = "DWD"; my $sday = "Jan 1 2010"; my $eday = "Dec 30 2010"; my $bday = "Jan 1 2010"; my $recur = new Date::Manip::Recur; my $err =$recur->parse($freq,$bday,$sday,$eday); print "parse err is $err <p>"; my @date = $recur->dates(); my $datenum = @date; print "There are $datenum list members <p>"; foreach my $i (@date){ print "The date is $i->value<p>"; } exit;
headdeskStarting.... parse err is 0 There are 12 list members The date is Date::Manip::Date=HASH(0x8404c00)->value The date is Date::Manip::Date=HASH(0x83ff830)->value ...
In reply to Re^2: Date::Manip::Recur is not returning a list
by desertrat
in thread Date::Manip::Recur is not returning a list
by desertrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |