1. 程式人生 > >使用DurationFormatUtils把時間區間格式化為"天 時:分:秒"

使用DurationFormatUtils把時間區間格式化為"天 時:分:秒"

long l = 12300000000L
DurationFormatUtils.formatDuration(l,"dd'天'HH'小時'mm'分鐘'ss'秒'")
輸出:142天08小時40分鐘00秒
可以參考以前的一篇文章:http://blog.csdn.net/wangjian5748/archive/2007/03/22/1537602.aspx