if ($time_spec =~ m/^($chars+):($chars+)$/) {
my ($p1, $p2) = ($1, $2);
- $parse_single_timespec->($p1, 24, \$matchall_hours, $hours_hash);
- $parse_single_timespec->($p2, 60, \$matchall_minutes, $minutes_hash);
+ foreach my $p (split(',', $p1)) {
+ $parse_single_timespec->($p, 24, \$matchall_hours, $hours_hash);
+ }
+ foreach my $p (split(',', $p2)) {
+ $parse_single_timespec->($p, 60, \$matchall_minutes, $minutes_hash);
+ }
} elsif ($time_spec =~ m/^($chars)+$/) { # minutes only
$matchall_hours = 1;
foreach my $p (split(',', $time_spec)) {
' mon 0 0',
{ error => "unable to parse calendar event - unused parts" },
],
+ [
+ '0,1,3..5',
+ { h => '*', m => [0,1,3,4,5], dow => $alldays },
+ [
+ [0, 60],
+ [60, 3*60],
+ [5*60, 60*60]
+ ]
+ ],
+ [
+ '2,4:0,1,3..5',
+ { h => [2,4], m => [0,1,3,4,5], dow => $alldays },
+ [
+ [0, 2*60*60],
+ [2*60*60 + 60, 2*60*60 + 3*60],
+ [2*60*60 + 5*60, 4*60*60]
+ ]
+ ],
];
foreach my $test (@$tests) {