[SR-5967] DateFormatter returning nil for a valid Date string #48526
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Environment
Xcode Version: Version 8.3.3 (8E3004b)
Swift 3
Additional Detail from JIRA
md5: a97d39779f219b0c24daa79c250e6e55
Issue Description:
I was testing an app that has an UITextField where users enter a date, so I take the entered string and use a DateFormatter to generate a Date object.
The problem first occurred when I tried converting the string "10/15/2017" which returned a nil value. So I create a code to generate string from "01/01/2000" to "12/31/2020" and I realized that the problem is occurring in all years around October or November of each year.
I created a code to print all dates that returns a nil value:
I also tried changing the dateFormat, or even the locale properties and I'm also getting nil for some entries.
The text was updated successfully, but these errors were encountered: