dateoperations 0.0.3 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdb67e5aabbf75a2536a4966189c05d07700045bf491660872695a7852f69d4c
4
- data.tar.gz: 5f5d370c07cdd8c614bbf5df3bd755f8b256dfa5a9d8fe22352f4793f171d3f0
3
+ metadata.gz: 3e958298f0636cb1b72291ef587c23d400923ca9e4aa11363acb4876de121b13
4
+ data.tar.gz: 95a0988eb45f54e20d3a9c2a89963b0fab43dbaac75b9fad07e8479dd4f803c0
5
5
  SHA512:
6
- metadata.gz: 52a4e25a1d04b9cb165f507528f3886ed6564bdb04821505058b4d95c8706656901c91aaa3cd7ed7f674360c933416b9b5491ca86744e762c82bca1b8c5d8aeb
7
- data.tar.gz: a30c075bc82530d0f99303da88c3730d2f4640c2a289c2969c93d74d13c33074ed35c7cb7585f6d9eea1d64e4b90c128ce5bfc249143450836235c31ebc95619
6
+ metadata.gz: 46447d09101d3c7f3b22bd96d04bb45517d0d398f40e7fbdf5303daac3892d628f82686ec381304e81871e54843f273eff762f61ea0e83e05a64e456ed3426db
7
+ data.tar.gz: 6d080ac68f50ebd2b60308edbf9a8fb65957b9a34cca367685d1419a1c018c61a855ea3de5c4909c353d471b9bfab8de922e79f814267682893f711d1bb4cdaf
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ # 0.1.1 - Umzug des Repositories zu Codeberg und Aktualisierung aller Homepage-URLs
4
+ # 0.1.0 - Anhebung der Ruby-Mindestversion auf >= 3.4.0, Aktualisierung des holidays-Gems und Code-Refactoring
5
+ class DateOperations
6
+ VERSION = '0.1.1'
7
+ end
@@ -1,12 +1,15 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'date'
2
4
  require 'holidays'
5
+ require_relative 'dateoperations/version'
3
6
 
4
7
  ##
5
8
  # Different date operations, primarily around business days, based on the Holidays[https://github.com/holidays/holidays] Gem.
6
- # - Home[https://github.com/msc01/dateoperations]
9
+ # - Home[https://codeberg.org/msc01/dateoperations]
7
10
  # - Documentation[http://dateoperations.schwarze-web.de/DateOperations.html]
8
11
  class DateOperations
9
- @country = :de
12
+ @country = :de
10
13
 
11
14
  class << self
12
15
  # Switches to the calendar of the respective country:
@@ -49,7 +52,6 @@ class DateOperations
49
52
 
50
53
  # Checks whether a given date is a holiday based on the calendar for the respective country.
51
54
  def self.holiday?(date)
52
- return false if Holidays.on(date, DateOperations.country, :informal).empty?
53
- true
55
+ Holidays.on(date, DateOperations.country, :informal).any?
54
56
  end
55
57
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dateoperations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Schwarze
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-02-20 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: holidays
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '8'
18
+ version: '11'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '8'
25
+ version: '11'
27
26
  description: Simple date operations to determine weekends, holidays, and esp. business
28
27
  days. Based on the Holidays Gem.
29
28
  email: michael@schwarze-web.de
@@ -34,11 +33,12 @@ files:
34
33
  - LICENSE.txt
35
34
  - README.md
36
35
  - lib/dateoperations.rb
37
- homepage: https://github.com/msc01/dateoperations
36
+ - lib/dateoperations/version.rb
37
+ homepage: https://codeberg.org/msc01/dateoperations
38
38
  licenses:
39
39
  - MIT
40
- metadata: {}
41
- post_install_message:
40
+ metadata:
41
+ rubygems_mfa_required: 'true'
42
42
  rdoc_options: []
43
43
  require_paths:
44
44
  - lib
@@ -46,15 +46,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '0'
49
+ version: 3.4.0
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
- rubygems_version: 3.3.7
57
- signing_key:
56
+ rubygems_version: 4.0.17
58
57
  specification_version: 4
59
58
  summary: Date Operations
60
59
  test_files: []