LibWeb::Time - Various time formats for libweb applications
No non-standard Perl's library is required.
None.
use LibWeb::Time(); my $time = new LibWeb::Time(); my $wday_mon_mday = $time->get_date(); my $hh_mm_ss = $time->get_time(); my $wday_mon_dd_hh_mm_ss_yyyy = $time->get_datetime(); my $yyyymmddhhmmss = $time->get_timestamp(); my $yyyy = $time->get_year();
This class uses the perl's localtime() routine to provide several methods which return time in several formats.
The current version of LibWeb::Time is available at
http://libweb.sourceforge.net
Several LibWeb applications (LEAPs) have be written, released and are available at
http://leaps.sourceforge.net
get_date()
Return 'wday mon mday' as a string, e.g. 'Sun May 28'.
get_time()
Return 'hh:mm:ss' as a string, e.g. '14:35:47'.
get_datetime()
Return 'wday mon dd hh:mm:ss yyyy' as a string, e.g. 'Sun May 28 14:35:47 2000'. This is the same as using the perl's localtime() directly in scalar context.
get_timestamp()
Return 'yyyymmddhhmmss' as a string, e.g. '20000528133547'.
get_year()
Return 'yyyy' as a string, e.g. '2000'.
To install LibWeb::CGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LibWeb::CGI
CPAN shell
perl -MCPAN -e shell install LibWeb::CGI
For more information on module installation, please visit the detailed CPAN module installation guide.