public class DateUtils extends Object
Constructor and Description |
---|
DateUtils(ResourceBundle resourceBundle) |
Modifier and Type | Method and Description |
---|---|
String |
formatDurationPretty(long l)
This is used by the Velocity templates as a bean
|
static String |
getDurationPretty(long numSecs,
Function<String,String> i18nResolver,
boolean secondsResolution) |
static String |
getDurationPrettySecondsResolution(long numSecs,
ResourceBundle resourceBundle)
Converts a number of seconds into a pretty formatted data string.
|
public DateUtils(ResourceBundle resourceBundle)
public static String getDurationPrettySecondsResolution(long numSecs, ResourceBundle resourceBundle)
So for example 76
becomes '1 minute, 16 seconds'
, while 42
becomes '42 seconds'
numSecs
- the number of seconds in the durationresourceBundle
- a resouce bundle for i18npublic static String getDurationPretty(long numSecs, Function<String,String> i18nResolver, boolean secondsResolution)
public String formatDurationPretty(long l)
l
- a duration in secondsCopyright © 2021 Atlassian. All rights reserved.