22.09.2019, 15:23
Hi,
I just start created simple script for Name-days showing. It works, but realization I don/t like.. It just Scheduled script started every midnight:
How better do this, I mean code? Some next improvements I plan to add - different countries names for Name-days and then select which countries Name-days show at visu and make reminders. Also could be used for Birthdays or any celebration days..
So, any advises will be useful for me..
BR,
Alex
I just start created simple script for Name-days showing. It works, but realization I don/t like.. It just Scheduled script started every midnight:
Code:
--Namedays Script v.1
-- Set output address where Names will be showed
AddressOutput = '1/7/10'
Today = tonumber(string.format('%02d%02d', os.date("%d"), os.date("%m")))
-- Just today date converted in format ddmm and below comparison
if Today == 2209 then Nameday = "Maigurs, Mārica, Māris"
end
if Today == 2309 then Nameday = "Vanda, Veneranda, Venija"
end
if Today == 2409 then Nameday = "Agris, Agrita"
end
if Today == 2509 then Nameday = "Rauls, Rodrigo"
end
if Today == 2609 then Nameday = "Gundars, Knuts Kurts"
end
if Today == 2709 then Nameday = "Ādolfs, Ilgonis"
end
if Today == 2809 then Nameday = "Lana, Sergejs, Svetlana"
end
if Today == 2909 then Nameday = "Miģelis, Mihails, Miķelis, Miks, Mikus"
end
if Today == 3009 then Nameday = "Elma, Elna, Menarda"
end
if Today == 0110 then Nameday = "Lāsma, Zanda, Zandis"
end
if Today == 0210 then Nameday = "Ilma, Skaidris"
end
if Today == 0310 then Nameday = "Elza, Ilizana"
end
grp.write(AddressOutput, Nameday)
How better do this, I mean code? Some next improvements I plan to add - different countries names for Name-days and then select which countries Name-days show at visu and make reminders. Also could be used for Birthdays or any celebration days..
So, any advises will be useful for me..
BR,
Alex