https://github.com/fpg1503/anthropocene
👴 A set of categories that converts human readable dates and time intervals to foundation classes.
https://github.com/fpg1503/anthropocene
Last synced: 11 months ago
JSON representation
👴 A set of categories that converts human readable dates and time intervals to foundation classes.
- Host: GitHub
- URL: https://github.com/fpg1503/anthropocene
- Owner: fpg1503
- License: mit
- Created: 2015-02-09T23:20:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-10T03:46:43.000Z (over 11 years ago)
- Last Synced: 2025-07-11T20:23:07.381Z (11 months ago)
- Language: Ruby
- Homepage:
- Size: 156 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Anthropocene [](https://travis-ci.org/fpg1503/Anthropocene)
**A set of categories that converts human readable dates and time intervals to foundation classes.**
## Usage
``` objective-c
NSLog(@"Components: %@", [NSDateComponents componentsFromHumanReadableString:@"64 years, 32 months, 16 days, 8 hours, 4 minutes, 2 seconds, 1 nanosecond"]);
NSLog(@"Components: %@", [NSDateComponents componentsFromHumanReadableString:@"3day 9 years 4 seconds -5 minute 4 years 4 years -3seconds"]);
```
Result
```
Components:
Calendar Year: 64
Month: 32
Day: 16
Hour: 8
Minute: 4
Second: 2
Nanosecond: 1
Components:
Calendar Year: 17
Month: 0
Day: 3
Hour: 0
Minute: -5
Second: 1
Nanosecond: 0
```
## License
**Anthropocene** is available under the MIT license. See the LICENSE file for more info.