@ -6,6 +6,7 @@ use utf8;
use Mojo::Base 'Mojolicious::Plugin';
use POSIX qw(strftime);
use Text::Markdown;
sub register {
@ -22,6 +23,11 @@ sub register {
$text =~ s{\r?\n}{<br/>}go;
return $text;
});
$app->helper(from_unixtime => sub {
my ($c, $unixtime) = @_;
return strftime("%Y-%m-%d %H:%M", localtime($unixtime));
}
1;