Class: AchClient::AchWorks::DateFormatter
- Inherits:
-
Object
- Object
- AchClient::AchWorks::DateFormatter
- Defined in:
- lib/ach_client/providers/soap/ach_works/date_formatter.rb
Overview
For formatting dates for AchWorks
Class Method Summary collapse
-
.format(date) ⇒ String
Formats given date in the manner required by AchWorks The date can be a String or a Date/DateTime.
Class Method Details
.format(date) ⇒ String
Formats given date in the manner required by AchWorks The date can be a String or a Date/DateTime. If it is a string it will be given to the DateTime parser Will be formatted like 2016-08-11T09:56:24.35103-04:00
14 15 16 17 18 19 20 21 22 |
# File 'lib/ach_client/providers/soap/ach_works/date_formatter.rb', line 14 def self.format(date) if date.is_a?(String) format_string(date) elsif date.respond_to?(:strftime) format_date(date) else raise 'Cannot format date' end end |