in reply to Finding the dates for the reminder mail system
If you haven't already, look at The Many Dates and Times of Perl.
I prefer to work with epoch time when doing calculations, and convert back to other formats for db queries or display.I would get the epoch time, then find the day of the week with Date::Day. Adding 14*24*60*60 to the current epoch time give you the epoch time two weeks from now (since epoch is in seconds, convert 14 days to hours then minutes then seconds to find that, thus 14*24*60*60). I assume you're using a databse to store projects, so just query for all projects due BETWEEN those two dates, after having converted them into a format the db likes.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Finding the dates for the reminder mail system
by TGI (Parson) on Nov 10, 2008 at 07:41 UTC |