Package io.vertigo.basics.formatter
Class FormatterDate
java.lang.Object
io.vertigo.basics.formatter.FormatterDate
- All Implemented Interfaces:
Formatter
Gestion des formattages de dates.
Args contient plusieurs arguments séparés par des points virgules ';'
Le premier argument est obligatoire il représente le format d'affichage d'une date .
Les arguments suivants sont facultatifs ils représentent les autres formats de saisie autorisés.
Par défaut le premier format de saisie autorisé est le format d'affichage.
En effet, pour des raisons ergonomiques il est toujours préférable de pouvoir saisir ce qui est affiché.
Exemple 1 d'argument : "dd/MM/yyyy "
On affiche la date au format dd/MM/yyyy
En saisie on autorise dd/MM/yyyy
Exemple 2 d'argument : "dd/MM/yyyy ; dd/MM/yy"
On affiche la date au format dd/MM/yyyy
En saisie on autorise dd/MM/yyyy et dd/MM/yy
- Author:
- pchretien
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstringToValue(String strValue, io.vertigo.core.lang.BasicType dataType) valueToString(Object objValue, io.vertigo.core.lang.BasicType dataType)
-
Constructor Details
-
FormatterDate
Constructor.
-
-
Method Details
-
valueToString
- Specified by:
valueToStringin interfaceFormatter
-
stringToValue
public Object stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType) throws FormatterException - Specified by:
stringToValuein interfaceFormatter- Throws:
FormatterException
-