com.aelitis.azureus.core.metasearch.utils
Class MomentsAgoDateFormatter
java.lang.Object
com.aelitis.azureus.core.metasearch.utils.MomentsAgoDateFormatter
public class MomentsAgoDateFormatter
- extends Object
Improvement based on AZWEB-318.
- Since:
- 3.2.1.0 6/19/2007
- Version:
- 3.2.1.0 6/19/2007
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MomentsAgoDateFormatter
public MomentsAgoDateFormatter()
getMomentsAgoString
public static String getMomentsAgoString(Date pastDate,
DateFormat format)
- Returns "x ago on " by comparing the
given pastDate with the current time. All formats are converted to GMT
time. In the future the user might have their own locale, in which case
we will display the time in their own locale (neat!)
- Parameters:
pastDate
- A date in the pastformat
- The format for the pastDate
- Returns:
- "x ago on "
getMomentsAgoString
public static String getMomentsAgoString(Date pastDate)
- Returns "x ago on " by comparing the
given pastDate with the current time.
- Parameters:
pastDate
- A default locale date in the past
- Returns:
- "x ago"