A "time ago", "time since", "relative date", or "fuzzy date" category for NSDate and iOS, Objective-C, Cocoa Touch, iPhone, iPad
Branch: master
Clone or download
kevinlawler Merge pull request #123 from robos23/master
fix a word in slovak strings file
Latest commit 89c50ce Dec 7, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
NSDateTimeAgo.bundle Merge branch 'master' of https://github.com/kevinlawler/NSDate-TimeAgo Dec 7, 2017
NSDateTimeAgo.xcodeproj fix project file Dec 7, 2017
Tests update for GM Sep 11, 2016
.gitignore Add project to build a Framework for Carthage: fix #91 Oct 13, 2015
LICENSE Add license title Jun 29, 2016
NSDate+Extension.swift remove force wrapping Sep 11, 2017
NSDate+TimeAgo.h updating header file to include timeAgoSimple Jan 16, 2014
NSDate+TimeAgo.m LocaleCode bug fixed. Added Ukrainian. May 20, 2016
NSDate+TimeAgo.podspec added swift to podspec May 16, 2017
NSDateTimeAgo.bundle.zip Added estonian language Oct 17, 2016
README.md Updated Readme.md for supported strings, and placed the people who co… Jun 20, 2017


Carthage compatible

Migration 2014.04.12

NSDate+TimeAgo has merged with DateTools. DateTools is the parent project and Matthew York is the project head.

This project is now part of DateTools. Please visit https://github.com/MatthewYork/DateTools

This repo is here in archive form. New work should be contributed to DateTools.

2016.01.04. To reiterate, all issues and contributions should go to DateTools, there is zero promise anything here will be looked at. Kevin's attention is on Kerf.


This is an iOS, Objective-C, Cocoa Touch, iPhone, iPad category for NSDate. It gives NSDate the ability to report times like "A moment ago", "30 seconds ago", "5 minutes ago", "Yesterday", "Last month", "2 years ago", and so on.

This functionality has variously been referred to as a "time ago", "time since", "relative date", or "fuzzy date" feature.

NSDate+TimeAgo currently supports the following languages:

  • en (English)
  • ee (Estonian)
  • es (Spanish)
  • zh_Hans (Chinese Simplified)
  • zh_Hant (Chinese Traditional)
  • pt (Portuguese)
  • fr (French)
  • it (Italian)
  • ru (Russian)
  • de (German)
  • nl (Dutch)
  • hu (Hungarian)
  • fi (Finnish)
  • ja (Japanese)
  • vi (Vietnamese)
  • ro (Romanian)
  • da (Danish)
  • cs (Czech)
  • nb (Norwegian)
  • lv (Latvian)
  • tr (Turkish)
  • ko (Korean)
  • bg (Bulgarian)
  • he (Hebrew)
  • ar (Arabic)
  • gre (Greek)
  • pl (Polish)
  • sv (Swedish)
  • th (Thai)
  • uk (Ukrainian)
  • is (Icelandic)
  • sq (Albanian)
  • sk (Slovak)
  • ms (Malay)
  • km (Cambodian)
  • id (Bahasa-Indonesia)
  • mn (Mongolian)
  • ur (Urdu)

If you know a language not listed here, please consider submitting a translation. Localization codes by language.

This project is user driven (by people like you). Pull requests close faster than issues (merged or rejected).


  1. Add the files to your project - manually or via Cocoapods (pod 'NSDate+TimeAgo')
  2. Import the header using #import "NSDate+TimeAgo.h"
  3. Call the timeAgo method in the following way:
NSDate *date = [[NSDate alloc] initWithTimeIntervalSince1970:0];
NSString *ago = [date timeAgo];
NSLog(@"Output is: \"%@\"", ago);
2011-11-12 17:19:25.608 Proj[0:0] Output is: "41 years ago"

2 other methods are available:

  • dateTimeAgo: returns times with only strings of the type: "{value} {unit} ago"
  • dateTimeUntilNow: returns only "yesterday" / "this morning" / "last week" / "this month" -- less precise than dateTimeAgo but more natural

Those three methods can be interchanged as they have the same signature.

Future Directions

Would be nice to

  1. add customization options (e.g., should it report seconds or just "a minute ago")
  2. add string customization
  3. have more localizations
  4. make dateTimeUntilNow more precise: instead of "Last week" use "Last Friday", "Last Monday" etc.
  5. other


Released under ISC (similar to 2-clause BSD)



Originally based on code Christopher Pickslay posted to Forrst. Used with permission. http://twitter.com/cpickslay

Ramon Torres began support for internationalization/localization. Added es strings. http://rtorres.me/

Dennis Zhuang added zh_Hans Chinese Simplified strings. http://fnil.net/

Mozart Petter added pt_BR Brazilian Portuguese strings. http://www.mozartpetter.com/

Stéphane Gerardot added fr French strings.

Marco Sanson added it Italian strings. http://marcosanson.tumblr.com/

Almas Adilbek added ru Russian strings. Extended logic to support Russian idioms. http://mixdesign.kz/

Mallox51 added de German strings. https://github.com/Mallox51

Tieme van Veen added nl Dutch strings. http://www.tiemevanveen.nl

Árpád Goretity added hu Hungarian strings. http://apaczai.elte.hu/~13akga/

Anajavi added fi Finnish strings. https://github.com/anajavi

Tonydyb added ja Japanese strings.

Vinhnx added vi Vietnamese strings. http://vinhnx.github.io/

Ronail added zh_Hant Traditional Chinese strings. https://github.com/ronail

SorinAntohi added ro Romanian strings. https://github.com/SorinAntohi

spookd added da Danish strings. https://github.com/spookd

Barrett Jacobsen added cs Czech strings. https://github.com/barrettj

Dmitry Shmidt added nb Norwegian strings. https://github.com/shmidt

Martins Rudens added lv Latvian strings. https://github.com/rudensm

Osman Saral added tr Turkish strings. https://github.com/osrl

analogstyle added ko Korean strings. http://almacreative.net/

Flavio Caetano fixed pt Portuguese strings. http://flaviocaetano.com

kolarski added bg Bulgarian strings. http://github.com/kolarski

Vladimir Kofman added he Hebrew strings. https://github.com/vladimirkofman

Viraf Sarkari added ar Arabic, gre Greek, pl Polish, sv Swedish, and th Thai strings. https://github.com/viraf

Vasyl Skrypii added uk Ukranian strings. https://github.com/medlay

Maggi Trymbill added is Icelandic strings. https://github.com/grundvollur

Erid Bardhaj added sq Albanian strings. https://github.com/eridbardhaj

Joan Biscarri added ca Catalan strings. https://github.com/jbiscarri

Gantulga added mn Mongolian strings. https://github.com/gangstarmn

ali-ehsan added ur Urdu strings. https://github.com/ali-ehsan

Zonily Jame Pesquera added id Bahasa Indonesia strings. https://github.com/kuyazee

Zonily Jame Pesquera added km Khmer strings. https://github.com/kuyazee