CoLong Posted April 25 Posted April 25 I would like to program an event to occur on the same day and month every year. How do I do that without having to go into the calendar and reset the year each time a new year rolls around?
Geddy Posted April 25 Posted April 25 @CoLong since UD programming can't use wild cards for dates I think the best bet would be to use a plugin like HolidaysGoogle and setup an annual event then create a program for when that event happens. Sorry, I don't use that plugin so can't help with setup or application, but that might be the best way to achieve something like that. Otherwise, can write your program with "OR" and put the dates in there for the next few years. Then just make a reminder in some future date to add some more years. Annual Program Test If Time is 3:00:00PM on 2024/04/25 Or Time is 3:00:00PM on 2025/04/25 Or Time is 3:00:00PM on 2026/04/25 Or Time is 3:00:00PM on 2027/04/25 Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action')
oskrypuch Posted April 26 Posted April 26 (edited) @CoLong Just set up some variables, using the system time variables. Roll them over just after midnight. The sky is the limit, add new ones as you need to. I use these in a number of programs in my setup. So, for example, testing for ... $cal_month_of_year = 3 and $cal_day_of_month = 16 ... would give you March 16th. * Orest Edited April 26 by oskrypuch 1
paulbates Posted April 26 Posted April 26 If you get the timedata plugin, you can do this by writing a program that has 2 Ifs If month = April And day = 26 Then ..... Look for it in the plug-in store. I use it and it works well. (I'm not at home to access my eisy.. My sample program isn't exact but close) 3
Solution paulbates Posted April 26 Solution Posted April 26 Here's a screen shot of all of the values it provides https://forum.universal-devices.com/topic/43016-if-day-of-month-x/?do=findComment&comment=379456 1
Recommended Posts