NSDateComponentsFormatter should have a property to render "ago"
Originator: | steipete | ||
Number: | rdar://22050103 | Date Originated: | 29-Jul-2015 02:52 PM |
Status: | Open | Resolved: | |
Product: | Developer Tools | Product Version: | 8.4 |
Classification: | Enhancement | Reproducible: | Always |
Summary: We show a table where items are created some time in the past. “3 weeks ago” or “1 day ago”. Before we used TTTTimeIntervalFormatter (https://github.com/mattt/FormatterKit/blob/master/FormatterKit/TTTTimeIntervalFormatter.h) which has this feature. NSDateComponentsFormatter seems like a great replacement, unfortunately it doesn’t has present/pastDeicticExpressions. So we get “3 weeks” or “about 3 weeks” but not “3 weeks ago” in a language consistent way (german would be vor 3 Tagen, so reverse). This seems like an obvious omission and should be added in a future release.
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!