There's more than one way to do things | |
PerlMonks |
Date calculations in Perl for Win32by cei (Monk) |
on Aug 30, 2000 at 04:26 UTC ( [id://30244]=perlquestion: print w/replies, xml ) | Need Help?? |
cei has asked for the wisdom of the Perl Monks concerning the following question:
I have a poll whose results I want to reset automatically every week. The way I would normally do this would be to get the week number (1 to 52) using formatting of the unix date command, save that along with my poll data, and when someone adds new poll data, compare the current week with the stored week -- if they're different, reinitialize the poll results. That's what I'd LIKE to do. But I'm writing for a client who has a stock build of ActiveState on an NT server, so I can't do a system call (unless there's a nice DOS equivalent of date that can give me week number and not just "August 29, 2000"). Likewise, it doesn't look like Date::Calc is part of the standard install for ActiveState perl, and even if it were, it would want a system_clock() call of some sort which may or may not be interpreted correctly by NT. (I haven't gotten that far, since Date::Calc wasn't installed anyway...) So how would YOU approach my particular problem? Help much appreciated.
Back to
Seekers of Perl Wisdom
|
|