org.opencms.workplace.list
Class CmsListDateFormatter

java.lang.Object
  extended by org.opencms.workplace.list.CmsListDateFormatter
All Implemented Interfaces:
I_CmsListFormatter

public class CmsListDateFormatter
extends java.lang.Object
implements I_CmsListFormatter

Simple formatter for dates.

Since:
6.0.0
Version:
$Revision: 1.12 $
Author:
Michael Moossen

Constructor Summary
CmsListDateFormatter()
          Default constructor.
CmsListDateFormatter(int dateStyle, int timeStyle)
          Customizable constructor.
 
Method Summary
 java.lang.String format(java.lang.Object data, java.util.Locale locale)
          Returns a formatted string for the specified data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsListDateFormatter

public CmsListDateFormatter()
Default constructor.

Use medium style.


CmsListDateFormatter

public CmsListDateFormatter(int dateStyle,
                            int timeStyle)
Customizable constructor.

Parameters:
dateStyle - the style for the date part
timeStyle - the style for the time part
See Also:
DateFormat
Method Detail

format

public java.lang.String format(java.lang.Object data,
                               java.util.Locale locale)
Description copied from interface: I_CmsListFormatter
Returns a formatted string for the specified data.

Take care of null data.

Specified by:
format in interface I_CmsListFormatter
Parameters:
data - the data to format
locale - the locale for formatting
Returns:
formatted data
See Also:
I_CmsListFormatter.format(java.lang.Object, java.util.Locale)