hebrew_date 1.0.18 → 1.0.19

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
  SHA1:
3
- metadata.gz: 9fff4c21e6a3bb271b306bf83dec28e7cff29dff
4
- data.tar.gz: df3c0cfc4ccf86cb70d33fe914cd543b8d4b3fbc
3
+ metadata.gz: c9b06836b1e07afa0a06de13451907261ea75cd0
4
+ data.tar.gz: 80e96f00415a3396eec12a6bb48b300aa8c0c7b6
5
5
  SHA512:
6
- metadata.gz: 3b0c80b2ffdab9b080c64d8ff95defcf4037850ef1486aad46c3a53f0a77066443e573a07903a79cd7f1ade5b813fd5af4d5aa2991bcec39464f7a5cd158edfe
7
- data.tar.gz: ba819d57a4b0077e07a0fb4a9b4599e36cce991bedb8e5eae6c6b74ad58bf651fd9d29ecc527e33b48d5649626ccab3f4471031dbb6ae09620abc83e51de1183
6
+ metadata.gz: 1c2b83ec6c71d6057deccc8388cd666d44420eb6d4029a708ce2afcbbc6b593bbf2ffd5300efea50617e5ec5ccfcade373b3238f18a53697b94c54e9329a7492
7
+ data.tar.gz: 288224dd8c89be103b548b07c3a2108211e98780d566c8763ab9ead194d09846dbdfb05c025fada8659b81d067dcbbf1892c71c7d44b5b61b5411662bb57a884
data/README.md CHANGED
@@ -47,6 +47,11 @@ except that they start with * instead of %:
47
47
  * ``*-d`` - Hebrew day of month, no-padded
48
48
  * ``*e`` - Hebrew day of month, blank-padded
49
49
 
50
+ There is an additional flag added which is of simple utility:
51
+
52
+ * ``%.b`` - Gregorian day of month, followed by a period (.), *except* for May,
53
+ which doesn't need one and is incorrect.
54
+
50
55
  Parsha
51
56
  ======
52
57
 
data/hebrew_date.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'hebrew_date'
3
3
  s.require_paths = %w(. lib)
4
- s.version = '1.0.18'
5
- s.date = '2014-03-06'
4
+ s.version = '1.0.19'
5
+ s.date = '2014-03-31'
6
6
  s.summary = 'Hebrew/Jewish dates, times, and holidays.'
7
7
  s.description = <<-EOF
8
8
  hebrew_date is a library designed to provide information about the Jewish
data/lib/hebrew_date.rb CHANGED
@@ -360,7 +360,9 @@ class HebrewDate < Delegator
360
360
  alias_method :shabbat?, :shabbos?
361
361
 
362
362
  # Extend the Date strftime method by replacing Hebrew fields. You can denote
363
- # Hebrew fields by using the * flag. Also note that ::replace_saturday will
363
+ # Hebrew fields by using the * flag. There is one extra flag, %.b, which
364
+ # adds a period after the 3-letter month name *except* for May.
365
+ # Also note that ::replace_saturday will
364
366
  # replace the %A, %^A, %a and %^a flags with Shabbat/Shabbos.
365
367
  # Supported flags are:
366
368
  # * *Y - Hebrew year
@@ -375,6 +377,8 @@ class HebrewDate < Delegator
375
377
  # * *d - Hebrew day of month, zero-padded
376
378
  # * *-d - Hebrew day of month, no-padded
377
379
  # * *e - Hebrew day of month, blank-padded
380
+ # * %.b - Gregorian month, 3 letter name, followed by a period, except for
381
+ # May
378
382
  # @param format [String]
379
383
  # @return [String]
380
384
  def strftime(format)
@@ -390,6 +394,7 @@ class HebrewDate < Delegator
390
394
  .gsub('*d', @hebrew_date.to_s.rjust(2, '0'))
391
395
  .gsub('*-d', @hebrew_date.to_s)
392
396
  .gsub('*e', @hebrew_date.to_s.rjust(2, ' '))
397
+ .gsub('%.b', self.month == 5 ? '%b' : '%b.')
393
398
  if self.class.replace_saturday && self.day == 7
394
399
  shab_name = self.class.ashkenaz ? 'Shabbos' : 'Shabbat'
395
400
  format = format.gsub('%A', shab_name)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hebrew_date
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 1.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Orner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-06 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard