Formats and parses dates using the SimpleDateFormat pattern.
This pattern is compatible with the I18N and java's SimpleDateFormatter.
Pattern | Description
----------------------------------------------------
d | Day of month 1 to 31, no padding
dd | Day of monath 01 to 31, zero leading
M | Month digit 1 to 12, no padding
MM | Month digit 01 to 12, zero leading
yy | 2 year digit, e.g., 96, 05
yyyy | 4 year digit, e.g., 2005
----------------------------------------------------
Usage example, to format a date
$formatter = new TSimpleDateFormatter("dd/MM/yyy");
echo $formatter->format(time());
To parse the date string into a date timestamp.
$formatter = new TSimpleDateFormatter("d-M-yyy");
echo $formatter->parse("24-6-2005");