class Hermod::XmlSectionBuilder

def datetime_node(name, options={})

Returns nothing you should rely on

options - a hash of options used to set up validations.
name - the name of the node. This will become the name of the method on the XmlSection.

Public: defines a node for sending a datetime to HMRC
def datetime_node(name, options={})
  validators = [].tap do |validators|
    validators << Validators::ValuePresence.new unless options.delete(:optional)
    validators << Validators::TypeChecker.new(DateTime) { |value| value.respond_to? :strftime }
  end
  create_method(name, [], validators, options) do |value, attributes|
    [(value ? value.strftime(format_for(:datetime)) : nil), attributes]
  end
end