Apache::HeavyCGI::Date - represent a date as both unix time and HTTP time


Apache-HeavyCGI documentation  | view source Contained in the Apache-HeavyCGI distribution.

Index


NAME

Top

Apache::HeavyCGI::Date - represent a date as both unix time and HTTP time

SYNOPSIS

Top

 my $date = Apache::HeavyCGI::Date->new;

 $date->unix(time);   # set
 print $date->unix;   # get
 print $date->http;   # get as http
 print $date;         # same thing due to overloading

DESCRIPTION

Top

This class implements a simple dual value date variable. There are only two accessor methods that let you set and get dates. unix() sets and gets the UNIX time, and http() gets and sets the HTTP time. Whenever a time is set the other time gets undefined. Retrieving an undefined time triggers a conversion from the other time. That way the two times are always synced.

PREREQUISITES

Top

The class uses HTTP::Date internally.

AUTHOR

Top

andreas koenig <andreas.koenig@anima.de>


Apache-HeavyCGI documentation  | view source Contained in the Apache-HeavyCGI distribution.