info.aduna.text
Class DateTimeUtil

java.lang.Object
  extended by info.aduna.text.DateTimeUtil

public class DateTimeUtil
extends java.lang.Object


Constructor Summary
DateTimeUtil()
           
 
Method Summary
static java.lang.String getNiceDateTimeString(java.util.Date date)
          Gets a "nice" human readable string for the supplied date.
static java.lang.String getNiceDateTimeString(long date)
          Converts the supplied 'date' to a Date object and call getNiceDateTimeString(Date).
static java.lang.String getNiceDurationString(long duration)
          Gets a "nice" human readable string for the supplied duration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTimeUtil

public DateTimeUtil()
Method Detail

getNiceDateTimeString

public static java.lang.String getNiceDateTimeString(long date)
Converts the supplied 'date' to a Date object and call getNiceDateTimeString(Date).

See Also:
getNiceDateTimeString(long)

getNiceDateTimeString

public static java.lang.String getNiceDateTimeString(java.util.Date date)
Gets a "nice" human readable string for the supplied date. This method distinguishes between the following situations:


getNiceDurationString

public static java.lang.String getNiceDurationString(long duration)
Gets a "nice" human readable string for the supplied duration. Example results are:

Parameters:
duration - A time in milliseconds
Returns:
A human readable string representing the duration.


Copyright © 2010 Aduna. All Rights Reserved.