$asctime

From Scriptwiki
Revision as of 14:43, 10 November 2005 by Microbe (talk | contribs) (fixed commenting syntax)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns the time and date in text format associated with the $ctime time value.

$asctime(N, format)

where N is the timestamp in unixtime, see $ctime for more information. See Time and Date Identifiers for full list of possible formats. Both N and format are optional, but only one at the time.

$asctime($ctime)

returns Wed Sep 21 20:30:26 2005 (for example). You'll get same result with $asctime(ddd mmm dd H:nn:ss yyyy). Without given N, $asctime uses $ctime as default.

$asctime(793947600)             ;returns the default text format for this time value
$asctime(hh:nn:ss)              ;returns the current time in this format
$asctime(793947600, dd/mm/yy)   ;returns the date for this time value

See Also