Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joshdholtz/nsdate-minimaltimeago

NSDate category for very minimal style time ago
https://github.com/joshdholtz/nsdate-minimaltimeago

Last synced: 17 days ago
JSON representation

NSDate category for very minimal style time ago

Awesome Lists containing this project

README

        

# NSDateMinimalTimeAgo
NSDate category for very minimal style time ago.

- Time Ago Output
- Seconds - 45s
- Minutes - 45m
- Hours - 12h
- Days - 5d
- Weeks - 3w
- Months - 10mo
- Years - 2y

## Examples

````objc

#import // If using CocoaPods
#import "NSDate+MinimalTimeAgo.h" // If dropped files from Classes directory in project directly

NSDate *somePastDate = [self somePastDate];
NSString *timeAgo = [somePastDate timeAgo];

````

## Installation

### Drop-in Classes
Clone the repository and drop in the .h and .m files from the "Classes" directory into your project.

### CocoaPods

NSDateMinimalTimeAgo is available through [CocoaPods](http://cocoapods.org), to install
it simply add the following line to your Podfile:

pod 'NSDateMinimalTimeAgo', '~> 0.1.0'

## Author

Josh Holtz, [email protected], [@joshdholtz](https://twitter.com/joshdholtz)

## License

NSDateMinimalTimeAgo is available under the MIT license. See the LICENSE file for more info.