i18n_date_range 2.1.0 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eccf6668937f6b5ac4859e9e93c8b7fc670148255b3770d33af7050f1ea1b759
4
- data.tar.gz: b2a32a1b7e54919ed762c0558fa14a51faf3a8996110981f2522fd133867ad20
3
+ metadata.gz: 325df9b5fc7d3c4556eabeb1b4c8f689f150eda430633c7578c677d7d924f428
4
+ data.tar.gz: 8ed8f3b5604b05b0e07cd393c2e20c8df50e1d6622272b49810519f75f2535b8
5
5
  SHA512:
6
- metadata.gz: '09789eb760b28e52537cb8adc815d8a7294b8bacf24f50220de04764f19bc69364a429b5742077cfa5dd8645b58417cbe59cf4f37e2fcf28851c49d18736bcfb'
7
- data.tar.gz: d5ad0aaef74b2b8b522b3765500149e1f6e80ed392bebd296543dbe3cbe5348d243569baa4450822d3d11ed59b07611d3c8a88c82e3fb14f89a8972e83b91c01
6
+ metadata.gz: 8f3843d5cad1e5e07947f6dfee00b210c1d90da605e14fb0b591a01733a26f6888a58a4a663b1f5514910b9696748ee6e687462adee957cefea03cfe899a6a7d
7
+ data.tar.gz: 160e2ac0804dc4170e1052ecd9b309cfbc3c28e5395868730bfc58f2472a0cff1ff6fe642a414bc8ed56ee4fd9964c4539e777fa9364f9ce6c4d35e50d81307c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- i18n_date_range (2.1.0)
4
+ i18n_date_range (2.1.2)
5
5
  rails
6
6
  rails-i18n
7
7
 
@@ -72,7 +72,7 @@ class I18nDateRangeGenerator
72
72
 
73
73
  def from_formatted
74
74
  @from_formatted ||= begin
75
- from = I18n.l(from_date, format: from_sentence)
75
+ from = I18n.l(from_date, format: from_sentence, locale: locale)
76
76
  from = from.upcase_first if from_upcase_first
77
77
  from
78
78
  end
@@ -81,7 +81,7 @@ class I18nDateRangeGenerator
81
81
  def to_formatted
82
82
  return '' if no_end?
83
83
  @to_formatted ||= begin
84
- to = I18n.l(to_date, format: to_sentence)
84
+ to = I18n.l(to_date, format: to_sentence, locale: locale)
85
85
  to = to.upcase_first if to_upcase_first
86
86
  to
87
87
  end
@@ -7,7 +7,8 @@
7
7
  module I18nDateRangeHelper
8
8
 
9
9
  def date_range_i18n(from_date, to_date = nil, **options)
10
- generator = I18nDateRangeGenerator.new(from_date, to_date, **options.slice(:format, :layout))
10
+ generator_options = options.slice(:format, :layout, :locale)
11
+ generator = I18nDateRangeGenerator.new(from_date, to_date, **generator_options)
11
12
  generator.to_s.html_safe
12
13
  end
13
14
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module I18nDateRange
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_date_range
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pabois