This project has retired. For details please refer to its
Attic page.
DateUtils (Apache Archiva Redback 3.0.0-SNAPSHOT API)
-
-
Constructor Summary
Constructors
Constructor |
Description |
DateUtils() |
|
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
formatWithAge
public static String formatWithAge(Date date,
String suffix)
Provided a date you will get a timestamp and the age/old that you want
- Parameters:
date
- the date to compare to now.
suffix
- the suffix in the age string. using "ago" here would result in "2006 Aug 23, 11:43 pm - 12 days ago"
- Returns:
- the formated string.
-
formatWithAge
public static String formatWithAge(Date date,
String dateFormat,
String suffix)
Provided a date you will get a timestamp and the age/old that you want.
- Parameters:
date
- the date to compare to now.
dateFormat
- the SimpleDateFormat
format string to use for the date.
suffix
- the suffix in the age string. using "ago" here would result in "2006 Aug 23, 11:43 pm - 12 days ago"
- Returns:
- the formated string.