The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

LibWeb::Time - Various time formats for libweb applications

SUPPORTED PLATFORMS

BSD, Linux, Solaris and Windows.

REQUIRE

  • No non-standard Perl's library is required.

ISA

  • None.

SYNOPSIS

  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();

ABSTRACT

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

DESCRIPTION

METHODS

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'.

AUTHORS

Colin Kong (colin.kong@toronto.edu)

CREDITS

BUGS

SEE ALSO