java - Format a period with DurationFormatUtils in a nice way -


this works well:

out.println(durationformatutils.formatperiod(                         new date().gettime(),                         match.getstartingtime().gettime(),                         "d h")); 

but have nicer format

out.println(durationformatutils.formatperiod(                         new date().gettime(),                         match.getstartingtime().gettime(),                         "d days h hours left")); 

but aspected gives output as

45 a01101 4 hour1101 left

is there simple solution problem?

it appear base formatting on simpledateformatter , escape character there '

so code this:

"d 'days' h 'hours left'" 

Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -