|
ECS Home Automation and Security Archives |
learn more
| view messages for this
month | NetBloc® | terms of use | search
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects
Subject: From: Date: | corrected Sundays Objects attached Mark Gilmore Sun, 16 Mar 2003 18:01:09 -0800 |
Sun, 16 Mar 2003 18:01:09 -0800
to use, append to your cfg.
i would also put each Sunday date in your "Time" Page.
Mark Gilmore
http://OmnipotenceSoftware.com
Name: 1st Sunday
Class: Integer
Base: Decimal
Minimum: 0
Maximum: 31
Persistent: No
: 0
Name: 2nd Sunday
Class: Integer
Base: Decimal
Minimum: 0
Maximum: 31
Persistent: No
: 0
Name: 3rd Sunday
Class: Integer
Base: Decimal
Minimum: 0
Maximum: 31
Persistent: No
: 0
Name: 4th Sunday
Class: Integer
Base: Decimal
Minimum: 0
Maximum: 31
Persistent: No
: 0
Name: 5th Sunday
Class: Integer
Base: Decimal
Minimum: 0
Maximum: 31
Persistent: No
: 0
Name: Last Sunday
Class: Integer
Base: Decimal
Minimum: 0
Maximum: 31
Persistent: No
: 0
Name: X:Weekday
Class: Choice
Choices: Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
Check: Yes
Dynamic: No
Persistent: No
: Sunday
Name: X:Day
Class: Integer
Base: Decimal
Minimum: 1
Maximum: 32
Persistent: No
: 1
Name: Sundays
Class: Script
Description: Calc 1st/2nd/3rd/4th/5th Sundays of this month
Control: Enabled
Called: No
Begin:
;************************************************
; Determine the dates for this month's Sundays
;------------------------------------------------
Do X:Weekday Set Clock.Weekday
Do X:Day Set Clock.Day
While X:Day > 1 ; Find weekday of the 1st
{
If X:Weekday Is Sunday
Then X:Weekday Set Saturday
Else X:Weekday Subtract 1
Do X:Day Subtract 1
}
Do 1st Sunday Set 0
Do 2nd Sunday Set 0
Do 3rd Sunday Set 0
Do 4th Sunday Set 0
Do 5th Sunday Set 0
While X:Day <= 31 ; walk thru each day, assigning Sunday dates
{
If X:Weekday Is Sunday
{
If 1st Sunday Is 0
Then 1st Sunday Set X:Day
Else If 2nd Sunday Is 0
Then 2nd Sunday Set X:Day
Else If 3rd Sunday Is 0
Then 3rd Sunday Set X:Day
Else If 4th Sunday Is 0
Then 4th Sunday Set X:Day
Else If 5th Sunday Is 0
Then 5th Sunday Set X:Day
}
If X:Weekday Is Saturday
Then X:Weekday Set Sunday
Else X:Weekday Add 1
Do X:Day Add 1
}
If 5th Sunday > 0
Then Last Sunday Set 5th Sunday
Else Last Sunday Set 4th Sunday
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003
subject (prev) or (next) |
time (prev) or (next) |
author (prev) or (next) |
view more subjects