hebrew_date 1.0.23 → 1.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hebrew_date.gemspec +1 -1
- data/lib/hebrew_date.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3c783d3d8a24c7952044732731bdccf929bc2c0
|
4
|
+
data.tar.gz: 45f1c8e0eb4413644426728414249d5d2111202d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de69a7bc1ed45f50504d7d0b64262b0405baafad20acaf7aa0d6a231c610f3f5a8416b20c371d9b054aa57c603ce288931aa6f5ec3d32d909809a0b37bc33773
|
7
|
+
data.tar.gz: f213f90828066445caf564d787af2a2c655188c61bbda0d0b13671a646c98660bb55946f6515750134adc8517a6ceaff933b8d449816780494e402b51117837c
|
data/hebrew_date.gemspec
CHANGED
data/lib/hebrew_date.rb
CHANGED
@@ -289,6 +289,24 @@ class HebrewDate < Delegator
|
|
289
289
|
self + 1
|
290
290
|
end
|
291
291
|
|
292
|
+
# This does not modify the current date, but creates a new one.
|
293
|
+
# @return [HebrewDate]
|
294
|
+
def next_hebrew_month
|
295
|
+
current_month = self.hebrew_month
|
296
|
+
date = self.clone
|
297
|
+
date.forward while date.hebrew_month == current_month
|
298
|
+
date
|
299
|
+
end
|
300
|
+
|
301
|
+
# This does not modify the current date, but creates a new one.
|
302
|
+
# @return [HebrewDate]
|
303
|
+
def prev_hebrew_month
|
304
|
+
current_month = self.hebrew_month
|
305
|
+
date = self.clone
|
306
|
+
date.back while date.hebrew_month == current_month
|
307
|
+
date
|
308
|
+
end
|
309
|
+
|
292
310
|
alias_method :succ, :next
|
293
311
|
|
294
312
|
# Move back one day.
|