diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..132a593 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: objective-c + +before_install: + - sudo gem update --system + - sudo gem install cocoapods + - sudo gem install ios_ci + - brew install ios-sim + - cd Spec + - pod + +script: ios_ci cedar --source-root $TRAVIS_BUILD_DIR/Spec --workspace NSDateCategoriesSpec.xcworkspace --scheme NSDateCategoriesSpec --build-path Build/Products diff --git a/README.md b/README.md index 48c7b11..2acfc7a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,36 @@ NSDate+Calendar === #### About -This is the set of categories on [NSDate](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html). +This is the set of categories on [NSDate](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html) that allow access to date components such as *year, month, week of year, week of month, weekday, day, hour, minute, second* in local time zone. -**Project is in progress. Please, wait.** +--- + +#### Install +Add to [Podfile](http://cocoapods.org/) `pod 'NSDate+Calendar'` + +--- + +#### Using + +###### Access to date componentes + +```objective-c +NSDate *date = [NSDate date]; +NSInteger year = date.year; +NSInteger month = date.month; +NSInteger day = date.day; +NSInteger weekOfYear = date.weekOfYear; +NSInteger weekOfMonth = date.weekOfMonth; +NSInteger weekday = date.weekday; +NSInteger hour = date.hour; +NSInteger minute = date.minute; +NSInteger second = date.second; +``` + +--- + +###### Create date from date components + + + +---