Package com.atlassian.greenhopper.util
Class TimeRemainingFormatter
java.lang.Object
com.atlassian.greenhopper.util.TimeRemainingFormatter
Formats a date as a string representing how much time is remaining (or how overdue the time is).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFormats the given date to an approximate amount of time remaining.
-
Constructor Details
-
TimeRemainingFormatter
public TimeRemainingFormatter()
-
-
Method Details
-
format
Formats the given date to an approximate amount of time remaining. The result depends on the amount of time between the date and now:- Two weeks or more - x weeks left/overdue
- 1 day to 13 days - x days left/overdue
- 1 hour to 23 hours - x hours left/overdue
- 0 minutes to 59 minutes - x minutes left/overdue
- Parameters:
dateTime- the DateTime to format. The formatted date will be in the time zone specified by the value of this parameter'sAbstractInstant.getZone()method.i18n- i18n- Returns:
- a formatted DateTime
-