Holidays.luaCreates holidays automatically to Rainlendar. To install just copy the file to Rainlendar's scripts folder. The script adds these holidays:
Download: Media:Holidays.lua (Requires Rainlendar b75 or newer) ResetView.lua
--
-- Resets the calendar's view to current month after few minutes has passed.
-- Drop the file to Rainlendar's scripts folder.
--
g_ResetView_Checks = 0
function ResetView_OnTimer(userData)
local day, month, year = Rainlendar_GetDisplayDate()
cMonth = os.date("%m") - 1
cYear = os.date("%Y")
-- If the month or year is not current, switch to current month
if ((cMonth - month ~= 0) or (cYear - year ~= 0)) then
g_ResetView_Checks = g_ResetView_Checks + 1
-- Don't change the month immediately since we don't know when the timer got triggered
if (g_ResetView_Checks > 5) then
g_ResetView_Checks = 0
Rainlendar_SetDisplayDate(day, cMonth, cYear)
Rainlendar_Redraw(0)
end
else
g_ResetView_Checks = 0
end
end
-- Create a timer which checks the current month
Rainlendar_CreateTimer(60 * 1000, ResetView_OnTimer)
Last modified April 12, 2009 10:31 am / Skin by Kevin Hughes
![]() |