NAME
Mojolicious::Plugin::DateTime - Mojolicious DateTime module integration!
SYNOPSIS
# mojolicious non-lite
$self->plugin('datetime');
# mojolicious lite
pligin 'datetime'
DESCRIPTION
This mojolicious plugin create a simple way to get an integration with DateTime module.
METHODS
This plugin contains the following methods...
datetime
# from controller
my $dt = $c->datetime( year => 2014, month => 9, day => 28 );
# from template
%= datetime( year => 2014, month => 9, day => 28 )
Getting a new DateTime object
dt
# from controller
my $dt = $c->dt( year => 2014, month => 9, day => 28 );
# from template
%= dt( year => 2014, month => 9, day => 28 )
Tiny way to call datetime
method
now
# from controller
my $dt = $c->now;
my $dt = $c->now( time_zone => 'local' );
# from template
%= now
%= now( time_zone => 'local' )
Shortcut to call <DateTime-
now>> method
AUTHOR
Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>
BUGS
Please report any bugs or feature requests to bug-mojolicious-plugin-datetime at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mojolicious-Plugin-DateTime. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
LICENSE AND COPYRIGHT
2014 (c) Daniel Vinciguerra.
This program is free software; you can redistribute it and/or modify it under the same terms of Perl Programming Language itself.