dateTime

Synopsis

String dateTime(long millisecs [, int dateFormat] [,int timeFormat])

Description

Converts the millsecs to a string using the rules given in http://java.sun.com/javase/6/docs/api/java/text/DateFormat.html. If only millsecs is provided dateformat and timeformat default to 0 (ie: FULL). If only millsecs and date is given timeformat defaults to -1. Dateformat takes a value between 0-3(FULL=0; 1=LONG; 2=MEDIUM; 3=SMALL) or some other value to simply print the time. Similar rules apply for the timeformat if specified. If both dateformat and timeformat are outside the range 0-3 an empty string is returned.

This function is efficient irrespective of its parameters.

Example

>> dateTime(0)
Wednesday, December 31, 1969 7:00:00 PM EST
>> dateTime(0,-1,2)
7:00:00 PM