Package io.vertigo.basics.formatter
Class FormatterDate
- java.lang.Object
-
- io.vertigo.basics.formatter.FormatterDate
-
- All Implemented Interfaces:
Formatter
public final class FormatterDate extends Object implements 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 Constructor Description FormatterDate(String args)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType)
String
valueToString(Object objValue, io.vertigo.core.lang.BasicType dataType)
-
-
-
Constructor Detail
-
FormatterDate
public FormatterDate(String args)
Constructor.
-
-
Method Detail
-
valueToString
public String valueToString(Object objValue, io.vertigo.core.lang.BasicType dataType)
- Specified by:
valueToString
in interfaceFormatter
-
stringToValue
public Object stringToValue(String strValue, io.vertigo.core.lang.BasicType dataType) throws FormatterException
- Specified by:
stringToValue
in interfaceFormatter
- Throws:
FormatterException
-
-