Module: ACH::StringFormattingHelper

Defined in:
lib/ach/string_formatting_helper.rb

Class Method Summary collapse

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
# 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+$/)
  f.strftime('%y%m%d')
end