net.lessy.util.format.impl
Class FormatDate
java.lang.Object
net.lessy.util.format.impl.FormatDate
- All Implemented Interfaces:
- FormatIF<Date>
- Direct Known Subclasses:
- FormatTime
public class FormatDate
- extends Object
- implements FormatIF<Date>
Implementation of a date formatter.
- Author:
- hl
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormatDate
public FormatDate()
format
public String format(Date value,
Locale locale,
Properties properties)
- Formats the value as a date. In this version the format is always the short german format dd.mm.yyyy
TODO use locale
- Specified by:
format in interface FormatIF<Date>
- Parameters:
value - Value to be formatted. This can be any type as long toString() delivers a date formattable valuelocale - Locale to be used. If null then the default locale is used (Ignored in this version)properties - Not used in this formatter.
- Returns:
- A Formatted date
getDateFormatter
public DateFormat getDateFormatter(Locale locale)
- Gets a dateformatter. This method can be overwritten by other formatters to format the date
in another way.
- Parameters:
locale - Locale to be used
- Returns:
- a DateFormatter.
Copyright © 2012. All Rights Reserved.