WoW:API date: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
Seems to return the date as a string like:
<tt>date ([format [, time]])</tt>
06/11/05 15:21:19


The date appears to be in the american format even in europe, ie the "06" above
It returns a string or a table containing the user's machine's current date and time (or the time represented by <tt>time</tt>), formatted according to the given string <tt>format</tt>.  If one wishes to supply your own format string, then it uses the same rules as [http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html strftime()].  The special string <tt>*t</tt> tells the <tt>date()</tt> function to return a table.
denotes the month, and the "11" is the day (Which would be written 11/6 most
places in Europe)


It appears the time is in the normal 24 hour clock though.
This is a mirror of the LUA function [http://www.lua.org/manual/5.0/manual.html#5.7 os.date()].


The time returned is that of the users own machine and not the time of the server.
If one supplies no arguments, it returns the current date and time formatted using the following string: <tt>%m/%d/%y %H:%M:%S</tt>
 
 
 
Crash.

Revision as of 23:29, 14 July 2005

date ([format [, time]])

It returns a string or a table containing the user's machine's current date and time (or the time represented by time), formatted according to the given string format. If one wishes to supply your own format string, then it uses the same rules as strftime(). The special string *t tells the date() function to return a table.

This is a mirror of the LUA function os.date().

If one supplies no arguments, it returns the current date and time formatted using the following string: %m/%d/%y %H:%M:%S