-
-
29 Apr 2016 17:31:09 UTC
- Distribution: Mojolicious-Plugin-TimeAgo
- Module version: 0.06
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (3)
- Testers (516 / 1 / 30)
- Kwalitee
Bus factor: 0- 93.10% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (9.59KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- METHODS
- CONFIGURATION
- TODO
- BUGS AND ISSUES
- AUTHOR
- LICENSE AND COPYRIGHT
- SEE ALSO
NAME
Mojolicious::Plugin::TimeAgo - DateTime TimeAgo Mojolicious Plugin
VERSION
version 0.6
SYNOPSIS
# Mojolicious $self->plugin( TimeAgo => { default => 'en' } ); # Mojolicious::Lite plugin TimeAgo => { default => 'en' };
DESCRIPTION
Mojolicious::Plugin::TimeAgo is a Mojolicious plugin that provide a feature to convert DateTime objects to "just now" string, for example.
It's a simple wrapper about DateTimeX::Format::Ago module class.
METHODS
time_ago([DateTime obj])
Method that translate you DateTime object into human readaable string.
# Mojolicious::Controller my $date = $self->time_ago( DateTime->now );
or ...
# view template %= time_ago DateTime->now <%= time_ago DateTime->now %>
CONFIGURATION
default
default
is the language configuration that your DateTime will be translated.See more about language in DateTimeX::Format::Ago.
TODO
* [done] Language support * [done] Get and use language by stash * Integration with I18N mojolicious plugin
BUGS AND ISSUES
Please report any bugs or feature requests at https://github.com/dvinciguerra/mojolicious-plugin-timeago/issues
AUTHOR
Daniel Vinciguerra <daniel.vinciguerra@bivee.com.br>
LICENSE AND COPYRIGHT
Copyright 2014-2016 Daniel Vinciguerra <dvinci at cpan.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Module Install Instructions
To install Mojolicious::Plugin::TimeAgo, copy and paste the appropriate command in to your terminal.
cpanm Mojolicious::Plugin::TimeAgo
perl -MCPAN -e shell install Mojolicious::Plugin::TimeAgo
For more information on module installation, please visit the detailed CPAN module installation guide.