Difference between revisions of "LlGetDate"
Jump to navigation
Jump to search
(EX) |
|||
Line 8: | Line 8: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples | |examples=<pre> | ||
// Birthday surprise | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
llSetTimerEvent(0.1); | |||
} | |||
timer() | |||
{ | |||
if(llGetDate() == "1987-02-15") | |||
llSetText("HAPPY BIRTHDAY!", <0,1,0>, 1.0); | |||
else | |||
llSetText("A surprise is comming...", <0,1,0>, 1.0); | |||
llSetTimerEvent(3600); // check every hour. | |||
} | |||
} | |||
</pre> | |||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow||[[llGetTimestamp]]|Same format but with the time.}} | |also_functions={{LSL DefineRow||[[llGetTimestamp]]|Same format but with the time.}} |
Revision as of 15:59, 17 May 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llGetDate( );204 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is the current date in the UTC time zone in the format "YYYY-MM-DD".
If you wish to know the time as well use: llGetTimestamp which uses the format "YYYY-MM-DDThh:mm:ss.ff..fZ"
Caveats
Examples
// Birthday surprise default { state_entry() { llSetTimerEvent(0.1); } timer() { if(llGetDate() == "1987-02-15") llSetText("HAPPY BIRTHDAY!", <0,1,0>, 1.0); else llSetText("A surprise is comming...", <0,1,0>, 1.0); llSetTimerEvent(3600); // check every hour. } }