in reply to Date::Set not returning correct results.

The examples are wrong - you must specify 'Z' at the end of the dates (meaning UTC time):

use Date::Set; $a = Date::Set->event(); $a->event( rule => 'FREQ=MONTHLY;INTERVAL=2;' ); $a->event( start => '20030801Z', end => '20031201Z' ); @list = $a->list; foreach (@list) { print "$_\n"; } # output 20030801Z 20031001Z 20031201Z

I would recommend you to use the DateTime::Event::ICal or DateTime::Event::Recurrence modules instead, because these have a larger user base, and thus have been much better tested.

Replies are listed 'Best First'.
Re: Re: Date::Set not returning correct results.
by the_0ne (Pilgrim) on Sep 07, 2003 at 03:36 UTC
    Thanks for the reply and the code fix.

    The reason I chose the Date::Set module is it looks like the rule argument can use pretty much anything in the RFC. That doesn't look to be the case for the other 2 modules. (Of course this opinion comes from looking quickly over the documentation this weekend.) I will definitely do a more exhaustive search and test on Monday.
    However, I am looking over the 2 you mention and I'm thinking they just might fit what I need. We'll see.

    Thanks again for the reply.