[![CI Status](http://img.shields.io/travis/Abdulmomen Kadum عبدالمؤمن كاظم/ArabicTimeAgo.svg?style=flat)](https://travis-ci.org/Abdulmomen Kadum عبدالمؤمن كاظم/ArabicTimeAgo)
import ArabicTimeAgo
...
let itemDateStr = "2017-01-19 09:12:07"
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
if let date = formatter.date(from: itemDateStr) {
print(TimeAgo.calculate(date: date, isAr: true)) // قبل 13 ساعة
print(TimeAgo.calculate(date: date, isAr: false)) // 13 hours ago
}
Swift 3
ArabicTimeAgo is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ArabicTimeAgo"
Abdulmomen Kadum عبدالمؤمن كاظم, a.bluemix@gmail.com
ArabicTimeAgo is available under the MIT license. See the LICENSE file for more info.