Currently you can add restrictions for date/time but it requires a year. It would be great if we could have a restriction by just month. (i.e. I want the piston to run in December for my Christmas lights, or on October for my Halloween lights)
[RESOLVED] Month Restriction
It’s not the built in one you’re looking for but in a bind you can do:
Expression: {$month} is equal to 12
(or not)
The easier way to input the expression would be
$month == 3
This would then be evaluated as true this month and would require no specific time definition.
{$month == 3} IS True
Is less efficient than:
{$month} IS 3
And if you want to restrict to multiple months then this would be more efficient:
{$month} IS {3 | 5 | 8}
So, in this example:
The first is more efficent than the second? Also, If I wanted a list for the first, I would input like this?
For some reason the expression here is evaluating to 15. Why is that?
Thanks, cause I wouldn’t have come up with that if I’d tried for a millenia. LOL You da .
To be honest I’m not entirely sure how that one works either lol… the matches() function isn’t on the wiki but @ipaterson mentioned it in another post the other day.
I get the overall syntax but I have no idea what the /‘s are for lol… the expression doesn’t work without them whatever they do!
If I find out I’ll update the wiki.
It probably follows how most regular expressions are formatted. I know at least using awk & sed they use the same thing. Even the vi editor uses them too