class Nfe::Helpers::XmlModel::AttributeDatetime
Public Instance Methods
format()
click to toggle source
# File lib/nfe/helpers/xml_model/attribute_datetime.rb, line 5 def format @format || "%Y-%m-%dT%H:%M:%S%:z" end
Private Instance Methods
add_element(attribute)
click to toggle source
# File lib/nfe/helpers/xml_model/attribute_datetime.rb, line 14 def add_element(attribute) attribute.strftime(format) end
get_value(value)
click to toggle source
# File lib/nfe/helpers/xml_model/attribute_datetime.rb, line 10 def get_value(value) DateTime.strptime(value, format) end