fix conflic

This commit is contained in:
Fred Beckhusen
2016-12-13 21:12:36 -06:00
3 changed files with 30 additions and 29 deletions

View File

@@ -1,27 +1,28 @@
// :CATEGORY:Clock
// :NAME:Get_Day_of_Week
// :AUTHOR:DoteDote Edison
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:54
// :ID:346
// :NUM:468
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// Method to get the day of the week from a unix timestamp - llGetUnixTime. The timestamp returns the number of seconds elapsed beginning Thursday, January 1, 1970 UTC. This script first converts the seconds to hours, then adds the GMT offset (if desired), then converts the hours to days, and finally grabs the day of the week from a list.
// :CODE:
// Gives day of the week
// Copyright © 2016 Linden Research, Inc. Licensed under Creative Commons Attribution-Share Alike 3.0
// DoteDote Edison
list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"];
integer offset = -4; // offset from UTC
default {
touch_start(integer total_number) {
integer hours = llGetUnixTime()/3600;
integer days = (hours + offset)/24;
integer day_of_week = days%7;
llSay(0, "Today is " + llList2String(weekdays, day_of_week));
}
}
// :CATEGORY:Clock
// :NAME:Get_Day_of_Week
// :AUTHOR:DoteDote Edison
// :CREATED:2010-01-10 05:20:56.000
// :EDITED:2013-09-18 15:38:54
// :ID:346
// :NUM:468
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// Method to get the day of the week from a unix timestamp - llGetUnixTime. The timestamp returns the number of seconds elapsed beginning Thursday, January 1, 1970 UTC. This script first converts the seconds to hours, then adds the GMT offset (if desired), then converts the hours to days, and finally grabs the day of the week from a list.
// :CODE:
// Gives day of the week
// Copyright 2016 Linden Research, Inc. Licensed under Creative Commons Attribution-Share Alike 3.0
// DoteDote Edison
list weekdays = ["Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"];
integer offset = -4; // offset from UTC
default {
touch_start(integer total_number) {
integer hours = llGetUnixTime()/3600;
integer days = (hours + offset)/24;
integer day_of_week = days%7;
llSay(0, "Today is " + llList2String(weekdays, day_of_week));
}
}

View File

@@ -4,7 +4,7 @@
// :AUTHOR:Ferd Frederix
// :KEYWORDS:
// :CREATED:2012-09-04 15:30:52.010
// :EDITED:2016-09-10 09:18:05
// :EDITED:2016-11-09 08:46:38
// :ID:902
// :NUM:1278
// :REV:1.1

View File

@@ -4,7 +4,7 @@
// :AUTHOR:Ferd Frederix
// :KEYWORDS:
// :CREATED:2013-12-14 13:33:32
// :EDITED:2016-09-10 09:18:14
// :EDITED:2016-11-09 08:46:47
// :ID:902
// :NUM:1558
// :REV:1.2