Module: Twinfield::Helpers::Parsers
- Included in:
- Browse::Transaction::CostCenter, Browse::Transaction::Customer, Browse::Transaction::GeneralLedger, Customer, Customer::CollectMandate, Customer::Financials, SalesInvoice, Transaction
- Defined in:
- lib/twinfield/helpers/parsers.rb
Instance Method Summary collapse
Instance Method Details
#parse_date(string) ⇒ Object
4 5 6 7 8 |
# File 'lib/twinfield/helpers/parsers.rb', line 4 def parse_date string if string && string != "" Date.strptime(string, "%Y%m%d") end end |
#parse_datetime(string) ⇒ Object
10 11 12 13 14 |
# File 'lib/twinfield/helpers/parsers.rb', line 10 def parse_datetime string if string && string != "" DateTime.strptime(string, "%Y%m%d%H%M%S") end end |
#parse_float(string) ⇒ Object
16 17 18 19 20 |
# File 'lib/twinfield/helpers/parsers.rb', line 16 def parse_float string if string && string != "" Float(string) end end |