formatos-febraban 0.3.44 → 0.3.45

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
  SHA1:
3
- metadata.gz: df175e1c5288bdad09334dc94518157ac5379699
4
- data.tar.gz: 4365ceaf02f457f2ac201376ac212db76e4f7b17
3
+ metadata.gz: 10dc05ffecd855898d818a82595eae00355de820
4
+ data.tar.gz: cc8df21f1b29e5edc93d13f00fe32032c956ba53
5
5
  SHA512:
6
- metadata.gz: adb5555b4ab05dd9c23120645f3f205adfdefc55d48fdbe3dd56510a767842bb3bb02126b9e2d612bba73c017e25f65f056bbc02a6918bb07b7fd8989b447be3
7
- data.tar.gz: 4c17f94282fbda49d7c593f57ec1c6e5710ee26287cfd1f0a1651f18a8f32409a768783dcfc47664a02bbedd4b70f7c077f9aa1b0eab922af42dad095984a460
6
+ metadata.gz: efc479d863a4dc5f001f88baffdb3edd41bd3c26a2bc22d9822fa1762073cbeceb613e9c55a553ab0ae4aef1d82461f567e8717de26230a21af7f53f67e7a520
7
+ data.tar.gz: 89e1a5056060464eea5a144b7b49e8284ee2493f64e5b5db56bebbf60c67ee892b417c69a1f437d9ddf93dbe4ca84f305c3fa24864df545749410eaa93b07283
@@ -181,8 +181,15 @@ class CieloDetalhe < FormatSection
181
181
  self.set_section_value(17, valor)
182
182
  end
183
183
 
184
+ #format yymm
184
185
  def set_validade_cartao valor
185
- self.set_section_value(18, valor)
186
+ if valor.is_a? String
187
+ validade = valor[-2..-1] + valor[0..1]
188
+ else
189
+ validade = valor.strftime("%y%m")
190
+ end
191
+
192
+ self.set_section_value(18, validade)
186
193
  end
187
194
 
188
195
  def set_reservado_6 valor = "0"
@@ -1,5 +1,5 @@
1
1
  module Formatos
2
2
  module Febraban
3
- VERSION = '0.3.44'
3
+ VERSION = '0.3.45'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatos-febraban
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.44
4
+ version: 0.3.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Ricardo Almeida