NSDateComponentsFormatter should have a property to render "ago"

Originator:futuretap
Number:rdar://22051255 Date Originated:29-Jul-2015 05:09 PM
Status:Duplicate/8176702/Open Resolved:
Product:Developer Tools Product Version:8.4
Classification:Enhancement Reproducible:Always
 
This is a duplicate of rdar://22050103

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!