Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 790

Date and Time • LuaCalendar

$
0
0
I found a solution within the XML file that works at least partly:

Code:

<Set Month="12"><!-- Advent days --><Event Day="(({$FirstSun}>3)*{$FirstSun})">2 Advent</Event><Event Day="(({$FirstSun}>3)*{$SecondSun})">3 Advent</Event><Event Day="(({$FirstSun}>3)*{$ThirdSun})">4 Advent</Event><Event Day="(({$FirstSun}<4)*{$FirstSun})">1. Advent</Event><Event Day="(({$FirstSun}<4)*{$SecondSun})">2. Advent</Event><Event Day="(({$FirstSun}<4)*{$ThirdSun})">3. Advent</Event><Event Day="(({$FirstSun}<4)*{$FourthSun})">4. Advent</Event></Set>
The crux of the matter is whether the first Sunday in December ist in the range of 1-3 (=> all advent days within December) or in the range of 4-7 (1. advent day in November).

The second block above — first Sunday =1/2/3 with condition ({$FirstSun}<4) — seems to work fine; I've checked it for several years.

The first block however — first Sunday =4/5/6/7 with condition ({$FirstSun}>3) — does not.

Of course there would be a combined form for at least advent days 2-4:

Code:

<Event Day="((({$FirstSun}<4)*{$SecondSun})+(({$FirstSun}>3)*{$FirstSun}))">2. Advent</Event><Event Day="((({$FirstSun}<4)*{$ThirdSun})+(({$FirstSun}>3)*{$SecondSun}))">3. Advent</Event><Event Day="((({$FirstSun}<4)*{$FourthSun})+(({$FirstSun}>3)*{$ThirdSun})">4. Advent</Event>
Unfortunately that also doesn't work. Have I missed some stupid syntax error?

Statistics: Posted by Jerry_B — Today, 6:53 pm — Replies 50 — Views 166438



Viewing all articles
Browse latest Browse all 790

Trending Articles