Module: ACH::StringFormattingHelper
- Defined in:
- lib/ach/string_formatting_helper.rb
Class Method Summary collapse
-
.stringify_with_same_day(f) ⇒ Object
Passing in SD to the date signifies same-day to banks.
Class Method Details
.stringify_with_same_day(f) ⇒ Object
Passing in SD to the date signifies same-day to banks. This is used for the company_descriptive_date
4 5 6 7 8 9 10 |
# File 'lib/ach/string_formatting_helper.rb', line 4 def self.stringify_with_same_day(f) return f.upcase if f.to_s.upcase.match(/^SD\d+$/) Date.strptime(f, '%y%m%d') rescue f end |