I, tried to parse a date in the following format and failed miserably:
2020-09-16 23:44:47 +0200
I wanted to parse a file containing dates in this format using the new RegexBuilders.
I was not able to generate or parse this format using the swift formatters introduced last year. I really tried for two hours to find matching formatting options.
I had to fall back on DateFormatter to make it work. Is there a better way?
Unfortunately my question was not very precise: I was looking for a solution in how to parse this kind of date format into a Date struct for using the corresponding swift formatter in a RegexBuilder, like shown in the WWDC Video "Swift Regex: Beyond the basics"
Oddly enough print(Date().now) generates exactly this format in the output, but I could not find corresponding options on Date.formatted(...) to generate or parse this kind of output.