public static interface

JiraDurationUtils.DurationFormatter

com.atlassian.jira.util.JiraDurationUtils.DurationFormatter
Known Indirect Subclasses

Class Overview

This interface defines methods for formatting time duration

Summary

Public Methods
String format(Long duration, Locale locale)
Formats a given time duration with given locale.
String format(Long duration)
Formats a given time duration with default (system) locale.
String getI18nKey()
String shortFormat(Long duration, Locale locale)
Formats a given time duration with the given locale in the most compact way possible
String shortFormat(Long duration)
Formats a given time duration with given locale in the most compact way possible.

Public Methods

public String format (Long duration, Locale locale)

Formats a given time duration with given locale.

Parameters
duration time duration to format
locale user's locale
Returns
  • formatted time duration

public String format (Long duration)

Formats a given time duration with default (system) locale.

Parameters
duration time duration to format
Returns
  • formatted time duration

public String getI18nKey ()

public String shortFormat (Long duration, 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

public String shortFormat (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