Method: XeroRuby::Projects::TimeEntryCreateOrUpdate#parse_date
- Defined in:
- lib/xero-ruby/models/projects/time_entry_create_or_update.rb
#parse_date(datestring) ⇒ Object
customized data_parser
263 264 265 266 |
# File 'lib/xero-ruby/models/projects/time_entry_create_or_update.rb', line 263 def parse_date(datestring) seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0 return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s end |