On 9/30/06, Adriano Ferreira <[EMAIL PROTECTED]> wrote:
The main point is the 'validate_time' method. What does it do? Verify that a date matches the specification given by the cron entry. Just this. '2009-09-01T00:00:00' matches '* * * * *' '2009-09-01T00:00:00' matches '0 * * * *' '2009-09-01T00:01:00' does not matches '0 * * * *' '2009-09-01T00:00:00' matches '* 0-2 1,10,20 * *' At a first glance, it seems DateTime::Event objects don't do this.
As far as I can see, use DateTime::Cron::Simple; DateTime::Cron::Simple->new($cron)->validate_time($dt); is equal to: use DateTime::Event::Cron; DateTime::Event::Cron->from_cron( cron => $cron )->valid($dt); -- Tatsuhiko Miyagawa