Function

date([timestamp])

returns string - timestamp is an optional parameter. if timestamp is omitted, current timestamp is used.

examples

date() returns current time/date in human readable formatted string:

Mon Oct 21 02:10:26 GMT-0500 2013

date(timestamp)

returns time/date in human readable formatted string for specified timestamp

date().getTime()

returns current timestamp (integer number).

timestamp is milliseconds since January 1st 1970 at 00:00:00

date(timestamp).getHours()

returns hour (integer number) for specified timestamp (or current time if timestamp is omitted).

date(timestamp).getMinutes()

returns minutes (integer number) for specified timestamp (or current time if timestamp is omitted).

date(timestamp).getSeconds()

returns seconds (integer number) for specified timestamp (or current time if timestamp is omitted).


CategoryFunctions

date (last edited 2013-11-20 21:08:26 by tech)