CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

KPTimeAgo 0.0.3

KPTimeAgo 0.0.3

Maintained by KPTimeAgo.



KPTimeAgo 0.0.3

  • By
  • Parth

KPTimeAgo

Platform iOS 11

Swift 4 compatible

License MIT

CocoaPods compatible

CocoaPods Install

Add this to your Podfile.

pod 'KPTimeAgo'

Manual Install

Just Drag and drop KPTimeAgo to your project.

Usage

First Step - import KPTimeAgo to your project

let timeAgo = (Date().formatDateAsTimeAgo()) 
print(timeAgo)
//Just now

Other Example
//August 25 at 10:30 AM
//July 25
//September 25
//July 25, 2022
//October 25
//July 25, 2023


Custom date format 
let timeAgo = KPTimeAgo.init(date: self.dateForComponents { $0.year = +6 }!, yesterdayFormat: nil, lastWeekFormat: nil, lastMonthFormat: nil, otherFormat: "LLLL d, yyyy")
print(timeAgo.formatDateAsTimeAgo())  //August 9, 2026 


Collaboration

Feel free to collaborate with ideas, issues and/or pull requests.

Contact

License

KPTimeAgo is released under the MIT License.