duration.rb 0.6.0 → 0.6.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: 879170199d5fdc472851ece21f3896aa08d7767484045d281834255ca51d8c84
4
- data.tar.gz: a35e1867f9712bb9aa415bcb577434e0683908c9f0c2579dfcaf27476770907c
3
+ metadata.gz: 4b96f8854514150e9a991174eee5ab4dbb5f0e829e3e3c15a093b1846a127f06
4
+ data.tar.gz: 7333289ca6c7552ac8db51fcfe6ea03a1101adc5f512a5167e2959ff03e544b8
5
5
  SHA512:
6
- metadata.gz: b4ab866878939cd01e8ab62ff977fb53e974fb67b6ea2385c4837f60d2420b73e418ed75ba21aac52143487dd9b6b6c4818a11aac969ce7e14cc403ce7678928
7
- data.tar.gz: 8b51e85072dbeede9062953fa1391a848242934c0d09559715a66bfc902cbd1284c7e53ef3e6811cbf859611c6f3d746d412eaf1e127e17e619c2a783446d552
6
+ metadata.gz: 5c763588f6127dd447cdfb7f0ec84230aec91ca79d7b561e76ed8084899e6bdcff073726498bfd079c430cc7e43990fe34b0cd1afa9fb5236ee9c9efa9c66ba7
7
+ data.tar.gz: cd053efb36ff1ac0f323464464ed879d19c6326af14b99aba93af9f3b12908744a00e6838b355e6a45e879236d4d40773072af965b726261ddcb3ebbe3589b54
data/CHANGELOG CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 20260816
4
+
5
+ 0.6.1: Documentation fixes for Months, which said one thing in the README and another in the class comment, and showed a third in the examples.
6
+
7
+ 1. ~ lib/Duration/Months.rb: /Months is slated for removal in 0.5.0/Months is therefore slated for removal/. 0.5.1 dropped the version from README.md, 0.5.0 having been and gone with Months still in place, but left the class comment still naming it, so the two have disagreed since and the comment is now two minor versions stale.
8
+ 2. ~ README.md: + 6.months.ago and 6.months.hence to the Time Calculations examples, each with the mean month noted beside it. Every other unit was shown and Months alone omitted, which implies that Months does not answer ago and hence, when 0.4.0 decided that it does and A Note on Months says as much eleven lines below. The examples are what is read first, so the omission was the louder statement of the two.
9
+ 3. ~ Duration::VERSION: /0.6.0/0.6.1/
10
+
11
+
3
12
  ## 20260812
4
13
 
5
14
  0.6.0: The unit classes are now autoloaded so as to avoid circular loading messages when running the tests. It's faster too!
data/README.md CHANGED
@@ -127,12 +127,19 @@ minutes reads the files for seconds and minutes and leaves the rest unread.
127
127
  5.days.ago # => #<Time:> (now - 5.days.to_seconds.to_f)
128
128
  6.weeks.ago # => #<Time:> (now - 6.weeks.to_seconds.to_f)
129
129
 
130
+ # Months too, but by the Gregorian mean month rather than a calendar month, so
131
+ # the result is approximate. See A Note on Months below.
132
+ 6.months.ago # => #<Time:> (now - 6.months.to_seconds.to_f)
133
+
130
134
  # The future
131
135
  2.seconds.hence # => #<Time:> (now + 2.seconds.to_seconds.to_f)
132
136
  3.minutes.hence # => #<Time:> (now + 3.minutes.to_seconds.to_f)
133
137
  4.hours.hence # => #<Time:> (now + 4.hours.to_seconds.to_f)
134
138
  5.days.hence # => #<Time:> (now + 5.days.to_seconds.to_f)
135
139
  6.weeks.hence # => #<Time:> (now + 6.weeks.to_seconds.to_f)
140
+
141
+ # Again by the mean month, and so approximate:
142
+ 6.months.hence # => #<Time:> (now + 6.months.to_seconds.to_f)
136
143
  ```
137
144
 
138
145
  ### A Note on Months
@@ -11,7 +11,7 @@ module Duration
11
11
  #
12
12
  # ago and hence (via Relative) inherit the same caveat: they displace by the
13
13
  # mean month rather than an actual calendar month, so they are approximate,
14
- # not calendar-correct. Months is slated for removal in 0.5.0.
14
+ # not calendar-correct. Months is therefore slated for removal.
15
15
  class Months
16
16
  include Common
17
17
  include Relative
@@ -1,3 +1,3 @@
1
1
  module Duration
2
- VERSION = '0.6.0'
2
+ VERSION = '0.6.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duration.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran