NSDateComponentsFormatter: support rounding

Originator:futuretap
Number:rdar://45681123 Date Originated:30-Oct-2018 10:31 PM
Status:Open Resolved:
Product:iOS + SDK Product Version:12.0
Classification:Feature (New) Reproducible:Always
 
Summary:
When formatting time intervals it would be useful to round numbers. Particularly, when allowedUnits filters small units such as seconds or minutes it would be useful to prevent an output of "0 minutes" or "0 hours" but to always round up in such cases.

We propose to either make NSDateComponentsFormatter a subclass of NSNumberFormatter or add the following properties from NSDateComponentsFormatter:

- roundingMode
- roundingIncrement

Steps to Reproduce:
-

Expected Results:
-

Actual Results:
-

Version:
12.0

Notes:

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!