public static class JiraDurationUtils.HoursDurationFormatter extends Object implements JiraDurationUtils.DurationFormatter
Modifier and Type | Field and Description |
---|---|
static String |
KEY_FORMAT_HOURS |
Constructor and Description |
---|
HoursDurationFormatter(I18nHelper i18nBean) |
Modifier and Type | Method and Description |
---|---|
String |
format(Long duration)
Converts the given time duration into hours and formats it based on the system locale.
|
String |
format(Long duration,
Locale locale)
Converts the given time duration into hours and formats it based on the given user's locale.
|
String |
getI18nKey() |
String |
shortFormat(Long duration)
Formats a given time duration with given locale in the most compact way possible.
|
String |
shortFormat(Long duration,
Locale locale)
Formats a given time duration with the given locale in the most compact way possible
|
public static final String KEY_FORMAT_HOURS
public HoursDurationFormatter(I18nHelper i18nBean)
public String getI18nKey()
getI18nKey
in interface JiraDurationUtils.DurationFormatter
public String format(Long duration)
format
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to formatpublic String format(Long duration, Locale locale)
format
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to formatlocale
- user's localepublic String shortFormat(Long duration)
JiraDurationUtils.DurationFormatter
shortFormat
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to formatpublic String shortFormat(Long duration, Locale locale)
JiraDurationUtils.DurationFormatter
shortFormat
in interface JiraDurationUtils.DurationFormatter
duration
- time duration in secondslocale
- locale to useCopyright © 2002-2019 Atlassian. All Rights Reserved.