Mojolicious::Plugin::TimeAgo - TimeAgo Mojolicious Plugin
# Mojolicious $self->plugin('TimeAgo'); # Mojolicious::Lite plugin 'TimeAgo';
Mojolicious::Plugin::TimeAgo is a Mojolicious plugin that provide a feature to convert DateTime objects to "just now" string, for example.
Mojolicious::Plugin::TimeAgo inherits all methods from Mojolicious::Plugin and implements the following new ones.
$plugin->register(Mojolicious->new);
Register plugin in Mojolicious application.
# Mojolicious::Controller my $date = $self->time_ago( DateTime->now );
or ...
# view template %= time_ago DateTime->now <%= time_ago DateTime->now %>
* Language support * Get and use language by stash * Integration with I18N mojolicious plugin
Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>
This software is copyright (c) 2014 by Daniel Vinciguerra (dvinci@cpan.org).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Mojolicious, Mojolicious::Guides, http://mojolicio.us.
To install Mojolicious::Plugin::TimeAgo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::TimeAgo
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::TimeAgo
For more information on module installation, please visit the detailed CPAN module installation guide.