encodeXmlDateTimeValue function

XmlElement encodeXmlDateTimeValue(
  1. String name,
  2. DateTime value, {
  3. String formatter(
    1. DateTime
    )?,
})

Implementation

XmlElement encodeXmlDateTimeValue(String name, DateTime value,
    {String Function(DateTime)? formatter}) {
  value = value.toUtc();

  formatter ??= iso8601ToJson;

  final output = formatter(value);

  return encodeXmlStringValue(name, output);
}