|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.JiraDurationUtils.DaysDurationFormatter
public static class JiraDurationUtils.DaysDurationFormatter
This formatter formats time duration to days only. The resulting string returned is a real number representing the number of days. This value is then formatted according to system or user's locale.
Field Summary | |
---|---|
static String |
KEY_FORMAT_DAYS
|
Constructor Summary | |
---|---|
JiraDurationUtils.DaysDurationFormatter(BigDecimal hoursPerDay,
I18nHelper i18nBean)
|
|
JiraDurationUtils.DaysDurationFormatter(int hoursPerDay,
I18nHelper i18nBean)
Deprecated. #DaysDurationFormatter(BigDecimal, I18nHelper) is preferred now that we can fractional number of hours per day |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_FORMAT_DAYS
Constructor Detail |
---|
public JiraDurationUtils.DaysDurationFormatter(int hoursPerDay, I18nHelper i18nBean)
hoursPerDay
- numbers of hours in a dayi18nBean
- i18nHelper to translate stringspublic JiraDurationUtils.DaysDurationFormatter(BigDecimal hoursPerDay, I18nHelper i18nBean)
Method Detail |
---|
public String getI18nKey()
getI18nKey
in interface JiraDurationUtils.DurationFormatter
public String format(Long duration)
format
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to format
public String format(Long duration, Locale locale)
format
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to formatlocale
- user's locale
public String shortFormat(Long duration)
JiraDurationUtils.DurationFormatter
shortFormat
in interface JiraDurationUtils.DurationFormatter
duration
- time duration to format
public String shortFormat(Long duration, Locale locale)
JiraDurationUtils.DurationFormatter
shortFormat
in interface JiraDurationUtils.DurationFormatter
duration
- time duration in secondslocale
- locale to use
public BigDecimal getHoursPerDay()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |