public static class JiraDurationUtils.PrettyDurationFormatter extends Object implements JiraDurationUtils.DurationFormatter
Modifier and Type | Field and Description |
---|---|
static String |
KEY_FORMAT_PRETTY |
Constructor and Description |
---|
PrettyDurationFormatter(BigDecimal hoursPerDay,
BigDecimal daysPerWeek,
I18nHelper i18nBean) |
PrettyDurationFormatter(int hoursPerDay,
int daysPerWeek,
I18nHelper i18nBean) |
Modifier and Type | Method and Description |
---|---|
String |
format(Long duration)
Formats a given time duration with default (system) locale.
|
String |
format(Long duration,
Locale locale)
Formats a given time duration with given locale.
|
BigDecimal |
getDaysPerWeek() |
BigDecimal |
getHoursPerDay() |
String |
getI18nKey() |
String |
shortFormat(Long duration)
Used by the Time Tracking report to show shorter durations than full pretty format.
|
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_PRETTY
public PrettyDurationFormatter(int hoursPerDay, int daysPerWeek, I18nHelper i18nBean)
public PrettyDurationFormatter(BigDecimal hoursPerDay, BigDecimal daysPerWeek, I18nHelper i18nBean)
public String getI18nKey()
getI18nKey
in interface JiraDurationUtils.DurationFormatter
public String format(Long duration)
JiraDurationUtils.DurationFormatter
format
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to formatpublic String format(Long duration, Locale locale)
JiraDurationUtils.DurationFormatter
format
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to formatlocale
- user's localepublic String shortFormat(Long duration)
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()
public BigDecimal getDaysPerWeek()
Copyright © 2002-2017 Atlassian. All Rights Reserved.