public static class JiraDurationUtils.DaysDurationFormatter extends Object implements JiraDurationUtils.DurationFormatter
Modifier and Type | Field and Description |
---|---|
static String |
KEY_FORMAT_DAYS |
Constructor and Description |
---|
DaysDurationFormatter(BigDecimal hoursPerDay,
I18nHelper i18nBean) |
DaysDurationFormatter(int hoursPerDay,
I18nHelper i18nBean)
Deprecated.
#DaysDurationFormatter(BigDecimal, I18nHelper) is preferred now
that we can fractional number of hours per day
|
Modifier and Type | Method and Description |
---|---|
String |
format(Long duration)
Converts the given time duration into days and formats it based on the system locale.
|
String |
format(Long duration,
Locale locale)
Converts the given time duration into days and formats it based on the given user's locale.
|
BigDecimal |
getHoursPerDay() |
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_DAYS
@Deprecated public DaysDurationFormatter(int hoursPerDay, I18nHelper i18nBean)
hoursPerDay
- numbers of hours in a dayi18nBean
- i18nHelper to translate stringspublic DaysDurationFormatter(BigDecimal hoursPerDay, 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 usepublic BigDecimal getHoursPerDay()
Copyright © 2002-2022 Atlassian. All Rights Reserved.