Class DateFormatter
- java.lang.Object
- 
- org.apache.turbine.services.pull.util.DateFormatter
 
- 
- All Implemented Interfaces:
- ApplicationTool
 
 public class DateFormatter extends Object implements ApplicationTool This pull tool is used to format date objects into strings.- Version:
- $Id$
- Author:
- Quinton McCombs, Scott Eade
 
- 
- 
Constructor SummaryConstructors Constructor Description DateFormatter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(Date theDate)Formats the given date as a String using the default date format.Stringformat(Date theDate, String dateFormatString)Formats the given date as a String.voidinit(Object data)Initialize the application tool.voidrefresh()Refresh the application tool.
 
- 
- 
- 
Constructor Detail- 
DateFormatterpublic DateFormatter() 
 
- 
 - 
Method Detail- 
initpublic void init(Object data) Initialize the application tool. The data parameter holds a different type depending on how the tool is being instantiated:- For global tools data will be null
- For request tools data will be of type RunData
- For session and persistent tools data will be of type User
 - Specified by:
- initin interface- ApplicationTool
- Parameters:
- data- initialization data
 
 - 
refreshpublic void refresh() Refresh the application tool. This is necessary for development work where you probably want the tool to refresh itself if it is using configuration information that is typically cached after initialization- Specified by:
- refreshin interface- ApplicationTool
 
 - 
formatpublic String format(Date theDate) Formats the given date as a String using the default date format. The default date format is MM/dd/yyyy- Parameters:
- theDate- date to format
- Returns:
- String value of the date
 
 
- 
 
-