Mac OS X 10.10.3: NSDateIntervalFormatter shows dates even when dateStyle is set to NSDateFormatterNoStyle
| Originator: | igeek1 | ||
| Number: | rdar://20938435 | Date Originated: | 13-May-2015 02:04 PM |
| Status: | Duplicate of 22182367 | Resolved: | 23-Sep-2015 04:12 PM |
| Product: | OS X | Product Version: | Mac OS X 10.10.3 (14D136) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: NSDateIntervalFormatter shows both dates AND times even when dateStyle is set to NSDateFormatterNoStyle. Steps to Reproduce: 1. Open the attached sample project. 2. Build and run. Expected Results: The final NSLog statement prints out “9:00 PM - 12:00 AM” Actual Results: The final NSLog statement prints out “5/12/2015, 9:00 PM - 5/13/2015, 12:00 AM” Regression: new class in 10.10 Notes: There appears to be some undefined/erratic behavior going on here. If you run the sample code at http://stackoverflow.com/a/30202745/255489 you will see that it works if endDate is one day BEFORE startDate, but not if it is 2 days before. Sample project: http://cl.ly/axyn
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Also posted on Stack Overflow: http://stackoverflow.com/questions/30201286/nsdateintervalformatter-printing-dates-even-when-datestyle-is-set-to-nsdateforma/30202745