Skip to content

Commit

Permalink
DateTimeType implements Java's Comparable in openHAB 4.3
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
  • Loading branch information
jimtng committed Sep 7, 2024
1 parent d9c465f commit 34b6939
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/openhab/core/types/date_time_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ class DateTimeType
remove_method :==

extend Forwardable
include Comparable

# @deprecated OH 4.2 DateTimeType implements Java's Comparable interface in openHAB 4.3
if OpenHAB::Core.version >= OpenHAB::Core::V4_3
include ComparableType
else
include Comparable
end

#
# Regex expression to identify strings defining a time in hours, minutes and optionally seconds
Expand Down

0 comments on commit 34b6939

Please sign in to comment.