Lenient Date Parsing
As far as I can see, [NSDateFormatter.lenient] doesn’t support anything like the range of the older APIs. Indeed as best I can tell the leniency only comes into play as far as separator characters are concerned. So for example, if dates are expected to be in the format YYYY/MM/DD, then strings of the form YYYY-MM-DD will also be accepted. But that’s about it.
NSDataDetector
is a possible solution.