Difference between revisions of "LlGetDate"

From Second Life Wiki
Jump to navigation Jump to search
(EX)
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|func_id=204|func_sleep=0.0|func_energy=10.0
|func_id=204|func_sleep=0.0|func_energy=10.0
|func=llGetDate|return_type=string
|func=llGetDate|sort=GetDate|return_type=string
|func_footnote=If you wish to know the time as well use: [[llGetTimestamp]] which uses the format "YYYY-MM-DDThh:mm:ss.ff..fZ"
|func_footnote=If you wish to know the time as well use: [[llGetTimestamp]] which uses the format "YYYY-MM-DDThh:mm:ss.ff..fZ"
|func_desc
|func_desc

Revision as of 14:11, 5 June 2007

Summary

Function: string llGetDate( );

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"

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. 
    }
}

See Also

Functions

•  llGetTimestamp Same format but with the time.

Articles

•  ISO 8601

Deep Notes

Search JIRA for related Issues

Signature

function string llGetDate();