com.atlassian.jira.util
Interface JiraDurationUtils.DurationFormatter

All Known Implementing Classes:
JiraDurationUtils.DaysDurationFormatter, JiraDurationUtils.HoursDurationFormatter, JiraDurationUtils.PrettyDurationFormatter
Enclosing class:
JiraDurationUtils

public static interface JiraDurationUtils.DurationFormatter

This interface defines methods for formatting time duration


Method Summary
 java.lang.String format(java.lang.Long duration)
          Formats a given time duration with default (system) locale.
 java.lang.String format(java.lang.Long duration, java.util.Locale locale)
          Formats a given time duration with given locale.
 java.lang.String getI18nKey()
           
 java.lang.String shortFormat(java.lang.Long duration)
          Formats a given time duration with given locale in the most compact way possible.
 java.lang.String shortFormat(java.lang.Long duration, java.util.Locale locale)
          Formats a given time duration with the given locale in the most compact way possible
 

Method Detail

getI18nKey

java.lang.String getI18nKey()

format

java.lang.String format(java.lang.Long duration)
Formats a given time duration with default (system) locale.

Parameters:
duration - time duration to format
Returns:
formatted time duration

format

java.lang.String format(java.lang.Long duration,
                        java.util.Locale locale)
Formats a given time duration with given locale.

Parameters:
duration - time duration to format
locale - user's locale
Returns:
formatted time duration

shortFormat

java.lang.String shortFormat(java.lang.Long duration)
Formats a given time duration with given locale in the most compact way possible.

Parameters:
duration - time duration to format
Returns:
formatted time duration

shortFormat

java.lang.String shortFormat(java.lang.Long duration,
                             java.util.Locale locale)
Formats a given time duration with the given locale in the most compact way possible

Parameters:
duration - time duration in seconds
locale - locale to use
Returns:
formatted time duration


Copyright © 2002-2010 Atlassian. All Rights Reserved.