Difference between revisions of "Now"
From SDU
m |
|||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | [[Category:Customizations]] | ||
[[Category:r6]] | [[Category:r6]] | ||
[[Category:r11]] | [[Category:r11]] | ||
| − | [[Category: | + | [[Category:Spell Code]] |
{{Global Header}} | {{Global Header}} | ||
{{Global Announcement}} | {{Global Announcement}} | ||
| − | |||
== Overview == | == Overview == | ||
| − | now() | + | Return current date and time in Unix datetime format. |
| + | |||
| + | == Usage == | ||
| + | <source lang="javascript"> | ||
| + | int now() | ||
| + | </source> | ||
| + | |||
| + | == Results == | ||
| + | Current date and time in Unix datetime format. | ||
| + | |||
| + | == Examples == | ||
| + | <source lang="javascript"> | ||
| + | chg.modified_date = now(); | ||
| + | alg.time_spent = now() - time_stamp; | ||
| − | + | if (now() > need_by) { | |
| + | set_return_data(TRUE); | ||
| + | } else { | ||
| + | set_return_data(FALSE); | ||
| + | } | ||
| + | </source> | ||
Revision as of 06:39, 21 August 2009
To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.
To discuss or ask questions about this article, select the discussion tab above.
Overview
Return current date and time in Unix datetime format.
Usage
<source lang="javascript"> int now() </source>
Results
Current date and time in Unix datetime format.
Examples
<source lang="javascript"> chg.modified_date = now(); alg.time_spent = now() - time_stamp;
if (now() > need_by) { set_return_data(TRUE); } else { set_return_data(FALSE); } </source>