in reply to Re: smart human readable time epoch
in thread smart human readable time epoch
use DateTime::Format::Human::Duration qw( ); my $formatter = DateTime::Format::Human::Duration->new(); sub format_duration { my ($dur) = @_; return $formatter->format_duration($dur, past => '%s ago', future => 'in %s', no_time=> 'now', ); }
Creating the argument is done using the same code as Re: smart human readable time epoch.
I'm still getting bad results, though. I think the module has a few bugs.
|
|---|