Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:API date
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowlua}} date() is a reference to the os.date function. It is put in the global table as the os module is not available. date ([format [, time]]) It returns a string or a table containing the user's machine's current date and time (or the [[API_time|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. This is a mirror of the LUA function [http://www.lua.org/manual/5.1/manual.html#pdf-os.date os.date()]. Note that the default format returned when calling the date() function with no parameters will be different depending on whether the game is running on a PC or a Macintosh computer. If you want your addon to be compatible with both systems, you should therefore not use date() without parameters, instead, use date("%m/%d/%y %H:%M:%S") to display the date in the default PC format -or- date("%a %b %d %H:%M:%S %Y") to display the date in the default Macintosh format
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)