我想为Template :: Toolkit模板提供一个整数。该整数表示经过的秒数。在perl的模板工具包中显示时间增量
我想格式化这个数字像这样:
1 => "1 second ago"
2 => "2 seconds ago"
43342 => "12 hours, 2 minutes ago" # ignoring the remaining 42 seconds
4333342 => "1 month, 19 days ago" # ignoring the remaining 17h, 42m & 22s
我找不到TT插件做到这一点。
我需要在TT之外进行格式设置吗?
感谢