Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
CLock Day-Of-Week  

Day-Of-Week

Day-of-the-week Function

Category: CLock
By : DoteDote Edison
Created: 2013-09-06 Edited: 2016-11-09
Worlds: Second Life

the Zip file

Download all files for Day-Of-Week
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
1
2 string getDay(integer offset)
3 {
4 list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"];
5 integer hours = llGetUnixTime()/3600;
6 integer days = (hours + offset)/24;
7 integer day_of_week = days%7;
8 return llList2String(weekdays, day_of_week);
9 }
10
11 default
12 {
13 touch_start(integer total_number)
14 {
15 integer offset = -4; // offset from UTC
16 llSay(0, "Today is " + getDay(offset) + ".");
17 }
18 } // end

Back to the Best Free Tools in Second Life and OpenSim.