[ back to toc ]

Perl time/expiration parameters

Date: 2002/03/20 15:16

I just need to find out how to
place/assign a date value (DD-MMM-YYYY)
i.e., assigning a specific date to the variable named 'expire' as opposed
to adding days to the time aquired from the server. So, for instance,
I need to assign '18-Aug-2002' to the variable, 'expire' instead of
assigning an expiration date by adding days to the current date and time.
Here is part of the script;

#adds days to 'expire' from the current
#time that is aquired from the server

<select name="expire">
<option value="30">30 days</option>
<option value="365">One year</option>

Here is a different line in the script;
$ed=$tm + (3600 * 24 * $expire);
*$ed is the expiration date*
*$tm is the current time*
*$expire is the users' expiration date*

There is also a file, expiry.db, that contains multiple users' expiration
data, and I also need to find out how to open/parse data from this file to
display a user's expiration date.
Thank you very much!

I assume what you need is the module Date::Manip



[ back to toc ]