Method: CoreLibrary::XmlHelper.datetime_to_s
- Defined in:
- lib/apimatic-core/utilities/xml_helper.rb
.datetime_to_s(value, datetime_format) ⇒ Object
Converts datetime to string of a specific format.
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/apimatic-core/utilities/xml_helper.rb', line 124 def datetime_to_s(value, datetime_format) case datetime_format when 'UnixDateTime' value.to_time.to_i when 'HttpDateTime' value.httpdate else value end end |