=pod =encoding utf8 =head2 Mojolicious Time Ago Plugin This is a simple plugin to provide to mojolicious a way to output DateTime date objects more human readable. The plugin will give a "time_ago" helper method that when you pass a DateTime it will return a text compatible with date like 'just now' and '2 weeks ago'. =head3 Synopsis First you have to configure plugin at Mojolicious app startup package MyApp; use Mojo::Base 'Mojolicious'; sub startup { my $self = shift # add time_ago plugin here $self->plugin('TimeAgo'); ... } Now you can use time_ago helper in your Controller... package MyApp::Controller::Home; use Mojo::Base 'Mojolicious::Controller'; sub index { my $self = shift; # more code here ... return $self->render( last_login => $self->time_ago( $user->last_access ) ) } ... or you can use at template files