WoW:API GetGameTime: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
({{wowapi}}, format)
Line 1: Line 1:
<center>'''GetGameTime''' ''-Documentation by [[user:Zlixar|Zlixar]]-''</center>
{{wowapi}} __NOTOC__
 
Returns the current server time in hours and minutes
Returns the current server time in hours and minutes
  hours,minutes = GetGameTime();
  hours,minutes = GetGameTime();
----
==Parameters==
;''Arguments''
===Returns===
 
:''none''
 
----
;''Returns''
 
:;hours : Number - The current hour.
:;hours : Number - The current hour.
:;minutes : Number - The minutes passed in the current hour.
:;minutes : Number - The minutes passed in the current hour.


----
==Example==
;''Example''
 
  local hour,minute = GetGameTime();
  local hour,minute = GetGameTime();
;''Result''
  message(hour .. ":" .. minute);
  hour = 16
===Result===
minute = 30
A message with the current server time appears.
 
----
;''Details''
 
:This is the server's current time, NOT the current time of the user's system.
 
----
{{WoW API}}

Revision as of 00:32, 24 December 2006

WoW API < GetGameTime

Returns the current server time in hours and minutes

hours,minutes = GetGameTime();

Parameters

Returns

hours
Number - The current hour.
minutes
Number - The minutes passed in the current hour.

Example

local hour,minute = GetGameTime();
message(hour .. ":" .. minute);

Result

A message with the current server time appears.