|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.mydb.data.date.DateFormatter
public class DateFormatter
Date format tool class. Deals with following formats :
- standard display : dd/mm/yyyy (fr) or mm/dd/yyyy (en)
- SQL format : java.sql.Date or string yyyy-mm-dd
- XmlForm format : yyyy/mm/dd
Constructor Summary | |
---|---|
DateFormatter(String pattern)
|
Method Summary | |
---|---|
String |
sqlToString(String sqlDate)
SQL format to HTML display : yyyy-mm-dd -> dd/mm/yyyy |
String |
stringToFormString(String stringDate)
HTML display to XML form format : dd/mm/yyyy -> yyyy/mm/dd |
Date |
stringToSql(String stringDate)
HTML display to SQL format : dd/mm/yyyy -> java.sql.Date |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateFormatter(String pattern)
Method Detail |
---|
public String sqlToString(String sqlDate) throws ParseException
sqlDate
-
ParseException
public Date stringToSql(String stringDate) throws ParseException
stringDate
-
ParseException
public String stringToFormString(String stringDate) throws ParseException
stringDate
-
ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |