Bug fix
[tpope-extra.git] / perl / schedproc
index 0dd2941026d074d1ed144fbbae243bae7743b5dd..3c34f3ac1b4805d8d73a653d69a76fced65745e7 100755 (executable)
@@ -105,13 +105,14 @@ sub next_class {
     @off = @{$class{'off'}} if ($class{'off'});
     for($today = ($today > $firstday ? $today : $firstday); $today < $lastday; $today++) {
        next unless(grep($_ == Day_of_Week($today->date), @days));
-       next if(grep($_ == $today, @off));
+       print "$today\n";
+       next if(grep($_ == "$today", @off));
        return $today;
     }
     $today = Date::Calc->new(Date::Calc->gmtime->date);
     for($today = ($today < $lastday ? $today : $lastday); $today > $firstday; $today--) {
        next unless(grep($_ == Day_of_Week($today->date), @days));
-       next if(grep($_ == $today, @off));
+       next if(grep($_ == "$today", @off));
        return $today;
     }
     return undef;