Fixed format date sample code is confusing due to redundancy
Originator: | douglashill | ||
Number: | rdar://37152952 | Date Originated: | 02-Feb-2018 01:58 pm |
Status: | Open | Resolved: | |
Product: | Documentation | Product Version: | N/A |
Classification: | Enhancement | Reproducible: | Always |
Summary: The NSDateFormatter documentation under ‘Working With Fixed Format Date Representations’ sets a dateFormat specifying a time zone, and also sets the timeZone property. This is redundant. The timeZone property is not used in this case. You can see this by running that code and commenting out the line setting the timeZone. Steps to Reproduce: Look at the code sample at https://developer.apple.com/reference/foundation/nsdateformatter#2528261 Expected Results: This code sample should not set the timeZone property. Actual Results: This example sets the timeZone property even though doing so does nothing. This makes the example confusing. Version: N/A Notes: Related: rdar://37152907 Documentation for NSDateFormatter timeZone is misleading
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!