openhab-scripting 2.25.1 → 2.25.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7226c1329289ce5ce0f85f552c091a6c5f89cb27427b9e6419d528c77a792239
4
- data.tar.gz: e92ad134d92584fed6ddeeef98984cabc56355cd94f4d205a5228263ac2677d1
3
+ metadata.gz: f3deb9da52443a92a787b19c30a5e540bf45ffa1f2ce69e7b47554190468e311
4
+ data.tar.gz: eae005970cf7f0c47f896fa9e2ab194c1a8c23b8901b535cde8b66efcc864e1c
5
5
  SHA512:
6
- metadata.gz: '0519c68cec3b2316751c36ba27c208267ee86f76230a1722dcd3369d61e19da73a96b6616ed2a71838daf68beb3f64b88e1553f82f8cb00daec4de5c859ecb87'
7
- data.tar.gz: f688f894e8a4bde1c3ee12facc846836a922cc7a1120ffd5d89ff41a6d6be1692608467265179543aaed1262394ea37aaa92d4bd5b03ad9eb33bcdd13b06c8dc
6
+ metadata.gz: 5fc8e075065e222e388a0c8b83a53644ea0b6d909f7c7c1109450f4be535a91e77319fa4d73e950df6ad9023bfc8051a242dcafcf51a1ff96934c6a43a9a8b51
7
+ data.tar.gz: b869685445af147f35ce27a793c8f533fdc39af25842935cd1c3265610383d0332830fae97edb4746a49dc96fd7f351debcb7e1eb28646c174dff03cef5e1c7f
@@ -22,11 +22,14 @@ module OpenHAB
22
22
 
23
23
  def_delegator :datetime, :to_s
24
24
  def_delegator :zoned_date_time, :month_value, :month
25
+ def_delegator :zoned_date_time, :day_of_month, :mday
26
+ def_delegator :zoned_date_time, :day_of_year, :yday
25
27
  def_delegator :zoned_date_time, :minute, :min
26
28
  def_delegator :zoned_date_time, :second, :sec
27
29
  def_delegator :zoned_date_time, :nano, :nsec
28
30
  def_delegator :zoned_date_time, :to_epoch_second, :to_i
29
31
  alias inspect to_s
32
+ alias day mday
30
33
 
31
34
  java_import Java::OrgOpenhabCoreLibraryTypes::DateTimeType
32
35
  java_import java.time.ZonedDateTime
@@ -181,6 +184,15 @@ module OpenHAB
181
184
  utc_offset.zero?
182
185
  end
183
186
 
187
+ #
188
+ # Returns an integer representing the day of the week, 0..6, with Sunday == 0.
189
+ #
190
+ # @return [Integer] The day of week
191
+ #
192
+ def wday
193
+ zoned_date_time.day_of_week.value % 7
194
+ end
195
+
184
196
  #
185
197
  # The timezone
186
198
  #
@@ -5,5 +5,5 @@
5
5
  #
6
6
  module OpenHAB
7
7
  # @return [String] Version of OpenHAB helper libraries
8
- VERSION = '2.25.1'
8
+ VERSION = '2.25.2'
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openhab-scripting
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.25.1
4
+ version: 2.25.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian O'Connell