Catalyst::Plugin::DateTime - DateTime plugin for Catalyst.
# In your application class use Catalyst qw/DateTime/; # Use DateTime objects within your Catalyst app: my $dt = $c->datetime(); # will return a DateTime object with local date and time my $dt = $c->datetime(year => '2005', month => '01'); $c->datetime->mdy(); # returns current date in mdy format (i.e. 01/01/2006) $c->dt(time_zone => 'Asia/Taipei'); # returns current date & time for argued time zone
If the argument list is empty, a DateTime object with the local date and time obtained via
DateTime->now()will be returned.
time_zone => localas a default.
Alias to datetime.
It adds the methods
dt to the
James Kiser firstname.lastname@example.org
Copyright (c) 2006 the aforementioned author(s). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 11:
=pod directives shouldn't be over one line long! Ignoring all 2 lines of content