Menu

#3 Configurable timestamp format

open
nobody
None
5
2004-10-11
2004-10-11
MoMaT
No

The timestamp format is the defult one for toString
method. I think it would be much more convienient if it
would be a configurable parameter. It can be then used
like this:
String format = "yyyy-MM-dd"; //set in config.xml
SimpleDateFormat dateFormat = new
SimpleDateFormat(format);
String timestamp = dateFormat.format(new Date());

Discussion


Log in to post a comment.