Apache2::WebApp::Plugin::DateTime - Plugin providing Date/Time methods
my $obj = $c->plugin('DateTime')->method( ... ); # Apache2::WebApp::Plugin::DateTime->method() or $c->plugin('DateTime')->method( ... );
Common methods for dealing with Date/Time.
This package is part of a larger distribution and was NOT intended to be used directly. In order for this plugin to work properly, the following packages must be installed:
Apache2::WebApp Date::Calc Date::Format Date::Manip Params::Validate Time::ParseDate
From source:
$ tar xfz Apache2-WebApp-Plugin-DateTime-0.X.X.tar.gz $ perl MakeFile.PL PREFIX=~/path/to/custom/dir LIB=~/path/to/custom/lib $ make $ make test $ make install
Perl one liner using CPAN.pm:
$ perl -MCPAN -e 'install Apache2::WebApp::Plugin::DateTime'
Use of CPAN.pm in interactive mode:
$ perl -MCPAN -e shell cpan> install Apache2::WebApp::Plugin::DateTime cpan> quit
Just like the manual installation of Perl modules, the user may need root access during this process to insure write permission is allowed within the installation directory.
Return the total days between dates.
my $date1 = 'Sun Oct 18 15:14:48 2009'; # then and my $date2 = localtime(time); # now my $delta = $c->plugin('DateTime')->days_between_dates( $date1, $date2 );
Convert seconds-since-epoch to a human readable format.
my $date = $c->plugin('DateTime')->format_time( $unix_time, '%a %b %d %T %Y' );
See Date::Format for character conversion specification.
Apache2::WebApp, Apache2::WebApp::Plugin, Date::Calc, Date::Format, Date::Manip, Params::Validate, Time::ParseDate
Marc S. Brooks, <mbrooks@cpan.org> - http://mbrooks.info
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://dev.perl.org/licenses/artistic.html
To install Apache2::WebApp::Plugin::DateTime, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::WebApp::Plugin::DateTime
CPAN shell
perl -MCPAN -e shell install Apache2::WebApp::Plugin::DateTime
For more information on module installation, please visit the detailed CPAN module installation guide.