com.atlassian.greenhopper.util
Class TimeRemainingFormatter

java.lang.Object
  extended by com.atlassian.greenhopper.util.TimeRemainingFormatter

@Service
public class TimeRemainingFormatter
extends java.lang.Object

Formats a date as a string representing how much time is remaining (or how overdue the time is).


Nested Class Summary
static class TimeRemainingFormatter.TimeRemaining
          Result of format(org.joda.time.DateTime, com.atlassian.greenhopper.model.I18n2)
 
Constructor Summary
TimeRemainingFormatter()
           
 
Method Summary
 TimeRemainingFormatter.TimeRemaining format(org.joda.time.DateTime dateTime, I18n2 i18n)
          Formats the given date to an approximate amount of time remaining.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeRemainingFormatter

public TimeRemainingFormatter()
Method Detail

format

public TimeRemainingFormatter.TimeRemaining format(org.joda.time.DateTime dateTime,
                                                   I18n2 i18n)
Formats the given date to an approximate amount of time remaining. The result depends on the amount of time between the date and now:

Parameters:
dateTime - the DateTime to format. The formatted date will be in the time zone specified by the value of this parameter's AbstractInstant.getZone() method.
i18n - i18n
Returns:
a formatted DateTime


Copyright © 2007-2013 Atlassian. All Rights Reserved.