XMLCoder
XMLCoder copied to clipboard
ISO8061 date formatting isn't working
I got an XML with dates formatted with ISO8061, but the XMLCoder can't decode them.
I've tried to user the ISO8601DateFormatter and, by itself, it does the job well. But I can't pass it to the XMLDecoder like this:
decoder.dateDecodingStrategy = .formatted(ISO8601formatter)
That's because you've restricted the . formatted case to a DateFormatter class instead of Formatter protocol.
Please, fix that. So It would be easy to decode dates in the custom format like this: 2021-02-13 07:40:35 +0200