tempora 0.2.2 → 0.2.4

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: 89b87271bfd8ca786ad770cdeb844a192d657363dcb55585edb5cc1b7d043714
4
- data.tar.gz: 754ec4aad6c5c5ef115eea19ac6f01767d4cda2e8ba97cfb07aa72c4566d40d6
3
+ metadata.gz: 6327210c05cd6e57387ce5f535f57124ab17f28d6420662f7c71226ea0de0bcc
4
+ data.tar.gz: 1199cc7e1fce28020eac60017ab4e16fffd808558c25d7fd155b210ec554929e
5
5
  SHA512:
6
- metadata.gz: 6b75b131397179c4538cbe45bf10cec72ac8308d5e7b4297b2addbff3fd7fc707c0d96a70903d6fd8fe843138eb12b9051a9152b334ecb82fc31f90e1285d5b7
7
- data.tar.gz: cb06dffbdb7f4f5df64732f689c230d52cc492040b6e78b1fbd814c50fe761bd0333d6b6d7520585c1102fcc8cec47108eebcf65d1cd30e3bde5cd84cdc72829
6
+ metadata.gz: 047b83913509e3d7394b6f646a1e8eb75bbb4fd75b7d1abb85fa5d8c7a6a0b26194fd69b7000d11717357005b693858a1691227c4bab25dcb39fa2c799690075
7
+ data.tar.gz: 73ad5d61432aad6aa039ba4f37d7698b0636618fdd1693266ce0af42d141b59c8ab4f25e3dbef33edb34f8f0534b866537e91371d4d1a7d7d80d8631b671c7dc
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tempora
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.4"
5
5
  end
data/lib/timeperiod.rb CHANGED
@@ -47,9 +47,15 @@ module Tempora
47
47
  def <=>(other)
48
48
  start_date <=> other.start_date
49
49
  end
50
-
51
- alias_method :begin, :start_date
52
- alias_method :end, :end_date
53
- alias_method :length, :duration
50
+
51
+ def hash
52
+ [self.class, id || range].hash
53
+ end
54
+
55
+ alias_method :begin, :start_date
56
+ alias_method :first_day, :start_date
57
+ alias_method :end, :end_date
58
+ alias_method :last_day, :end_date
59
+ alias_method :length, :duration
54
60
  end
55
61
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tempora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Power
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-19 00:00:00.000000000 Z
10
+ date: 2025-03-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: Tempora is a lightweight Ruby library for handling months, weeks, quarters,
13
13
  and years with intuitive date-based calculations and range support.
@@ -33,7 +33,6 @@ files:
33
33
  - lib/week.rb
34
34
  - lib/year.rb
35
35
  - sig/tempus.rbs
36
- - tempora-0.2.1.gem
37
36
  homepage: https://github.com/max-power/tempora
38
37
  licenses:
39
38
  - MIT
@@ -56,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
55
  - !ruby/object:Gem::Version
57
56
  version: '0'
58
57
  requirements: []
59
- rubygems_version: 3.6.2
58
+ rubygems_version: 3.6.5
60
59
  specification_version: 4
61
60
  summary: Tempora is a lightweight Ruby library for handling months, weeks, quarters,
62
61
  and years.
data/tempora-0.2.1.gem DELETED
Binary file