in my application I have a TableView that displays all the posts made by users of the app ...
I noticed that the date on social networks of the post is written based on the current date, for example:

The post was made ​​2 hours ago

In your opinion what is the best method to accomplish this? There are no tutorials or guides where I can figure out how to get this?

Thank you all for future councils
['https://Stackoverflow.com/questions/20469861', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2773233/']
Once you have NSDate of some event and your current date you can use NSCalendar to calculate the difference between them in calendar units you want. And then you can generate your user-readable string based on that (e.g. you may want to use only the largest non-zero date component):

```
NSCalendar *calendar = [NSCalendar currentCalendar];
unsigned int unitFlags = NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit;
NSDateComponents *components = [calendar components:unitFlags fromDate:startDate  toDate:endDate options:0];
if ([components month] > 0) {
   // some months ago
}
else if if ([components day] > 0) {
  // some days ago
} 
etc

```
Basically, create a timestamp using whenever a post is created. Then compare that to the current time.