LlGetDate/ja

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

要約

関数: llGetDate( );

UTC タイムゾーンでの現在の日付を "YYYY-MM-DD" 形式で返します。

時間を "YYYY-MM-DDThh:mm:ss.ff..fZ" の形式で知りたい場合は llGetTimestamp を使います。

サンプル

<lsl>// 誕生日サプライズ default {

   state_entry()
   {   
       llSetTimerEvent(0.1);
   }
   timer()
   {
       if(llGetDate() == "2009-02-15")
           llSetText("HAPPY BIRTHDAY!", <0,1,0>, 1.0);
       else
           llSetText("A surprise is coming...", <0,1,0>, 1.0);
        
       llSetTimerEvent(3600.0);  // 毎時間チェックを行う
   }

}</lsl> <lsl>// 通日を計算する関数 integer dayOfYear(integer year, integer month, integer day) {

   return day + (month - 1) * 30 + (((month > 8) + month) / 2)
- ((1 + (((!(year % 4)) ^ (!(year % 100)) ^ (!(year % 400)))

便利なスニペット

ヘルパー関数

関連項目

関数

•  llGetTimestamp 同じフォーマットですが、時刻も含みます

記事

•  ISO 8601

特記事項

Search JIRA for related Issues

Signature

function void llGetDate();
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。