openhab-core
openhab-core copied to clipboard
[automation] Add more basic time-related classes for usage in script and rules
- Add more basic time-related classes for usage in script and rules
Allows comparisons like new DateTimeType().zonedDateTime.getDayOfWeek() = DayOfWeek.MONDAY or new DateTimeType().zonedDateTime.getMonth() = Month.APRIL in rules or scripts.
Signed-off-by: Christoph Weitkamp [email protected]
This is surely a nice addition for DSL rules, but could it be we shadow language specific symbols when importing this in the default script scope for JSR223 scripts?
That is a good point. And I somehow agree. For JSR223 scripting it is just a convenient way for users to use the Java classes in there scripts while omitting to import them.