CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Nov 2015 |
Maintained by Kiara Robles.
Are you tired of the date spinner thingy? Well, I am!
This pod was developed to convert a NSString into a NSDate object so you dont have to use that date spinner anymore! Yay.
Developed and tested in Xcode 7.
Currently only Objective-C is supported.
The string "next Monday" returns the NSDate object of the next Monday, relative to today. The class interprets fuzzy human readable words to an exact date at midnight. Currently, the days of the week are supported with the prefix "next", "this", or "last", as well as the words "yesterday", "tomorrow", and "today".
KFRFuzzyDateTranslator instance = [[KFRFuzzyDateTranslator alloc] init];
NSString *string = @"I'll do the thing tomorrow!";
id date = [instance dateFromString:string];
KFRFuzzyDateTranslator *instance = [[KFRFuzzyDateTranslator alloc] initWithString:@"I did it last week!"];
id date = [instance dateFromString:instance.string];
KFRFuzzyDateTranslator *instance = [[KFRFuzzyDateTranslator alloc] initWithRelevantDate:@"01-JAN-70"];
id date = [instance dateFromString:instance.string];
Ideas for people who might want to hack on this:
KFRFuzzyDateTranslator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "KFRFuzzyDateTranslator"
kiaraRobles, [email protected]
KFRFuzzyDateTranslator is available under the MIT license. See the LICENSE file for more info.
MIT License
Copyright (c) 2015 Kiara Robles
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.