SSamuels Posted April 11, 2023 Posted April 11, 2023 I am sure this has been asked & answered previously, but my forum searches have not found an answer. Why doesn't IoX provide the capability to have calendar conditions in IF statements of programs, e.g., IF Calendar Date between X & Y, If Calendar date greater than, If Calendar Date Less than then..... Thanks
Ross Posted April 12, 2023 Posted April 12, 2023 This may not be helpful as I don't know the answer to your question, but there is a workaround. I use the Timedata Node server and you can use If statements with that data. Not exactly the ones you pose, but you can get there either with some math or brute force. - Ross
MrBill Posted April 12, 2023 Posted April 12, 2023 20 hours ago, SSamuels said: I am sure this has been asked & answered previously, but my forum searches have not found an answer. Why doesn't IoX provide the capability to have calendar conditions in IF statements of programs, e.g., IF Calendar Date between X & Y, If Calendar date greater than, If Calendar Date Less than then..... Thanks There are built in specific dates, such as: which would be true anytime during December THIS year. So we might combine two schedules using AND to do something useful like turn on the Christmas decorations, but only during December The problem with programs like these, is that they must be revised every year-- there is no method to enter a date WITHOUT the year in the built in date functions. Note for date option to show, you much uncheck daily: There's also a program that you can input once and run everyday to set a series of variables, that i've been using for a number of years... see this thread: with this method it's possible to find thanksgiving.. the 4th Thursday of November, or other combinations. As mentioned previously in this thread, there's also the date/time node server.
asbril Posted April 12, 2023 Posted April 12, 2023 (edited) 23 minutes ago, MrBill said: There are built in specific dates, such as: which would be true anytime during December THIS year. So we might combine two schedules using AND to do something useful like turn on the Christmas decorations, but only during December The problem with programs like these, is that they must be revised every year-- there is no method to enter a date WITHOUT the year in the built in date functions. Note for date option to show, you much uncheck daily: There's also a program that you can input once and run everyday to set a series of variables, that i've been using for a number of years... see this thread: with this method it's possible to find thanksgiving.. the 4th Thursday of November, or other combinations. As mentioned previously in this thread, there's also the date/time node server. As previously mentioned, I use the Holidays Google calendar nodeserver. In your Google Calendar you can select any (and multiple) calendars of interest, including US holidays, Jewish, Muslim and even sport calendars. These can then be used in IoX programs in IF. Note that this nodeserver only acts on whole day events, which should not be an issue with holidays. Edited April 12, 2023 by asbril
Schroeder Posted April 24, 2023 Posted April 24, 2023 I also utilize the program FOLDER conditions for things like this. Don't forget, you can set conditions for all programs within a folder to run or not based on a program FOLDER condition. I have one for Xmas lights that changes the way my outside lights behave during December months and I simply just stacked a lot of ranges together with OR statements. like IF month is Dec 2021 to Jan 2022 OR month is Dec 2022 to Jan 2023 OR month is Dec 2023 to Jan 2024 ...etc. I stack like 20 years up.
SSamuels Posted April 24, 2023 Author Posted April 24, 2023 Thank you, everyone for the helpful information. Best Stew
Recommended Posts