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

Date and Time • LuaCalendar

$
0
0
I'm a complete newbie to LUA calender and started an hour ago with filling the Event.xml with some recurring dates.

What I'd like to add to the dates are the advent Sundays. These are the last four Sundays before Christmas Day and thus obviously no fixed dates. The first Advent day may be as early as Nov., 27th or as late as Dec., 3rd.

The algorithm would be to put the last Sunday before Dec., 25th into a timestamp and march backward 3 times.

My question: How to formulate this algorithm as an easy LUA calendar formula? :???:

Any help appreciated!
Well... you said "easy", so I'm doubting there is an "easy" way. The non-easy way is to write your own function in LUA to do this. Look at the example Smurfier provided for Easter. You'd handle this exactly as you stated, and the same way Easter was handled, along with Good Friday, Ash Wednesday, etc.: find the Sunday before XMas and step back 1 week 3 times.

Statistics: Posted by SilverAzide — Yesterday, 10:43 pm — Replies 49 — Views 166306



Viewing all articles
Browse latest Browse all 909

Latest Images

Trending Articles



Latest Images