Update README.md
This commit is contained in:
parent
0141271adf
commit
5dbbc7aee2
|
|
@ -6,7 +6,7 @@
|
|||
// Copyright © 2016 Wenchao Ding. All rights reserved.
|
||||
//
|
||||
// 注意: 这些方法仅仅为了在IB中使用,不建议直接调用。这些方法在calendar.appearance中使用。如: calendar.appearance.eventDefaultColor
|
||||
// Warning: For IB usage only. Directly calling these methods is NOT RECOMMENDED. Use calendar.appearance to call these methods instead
|
||||
// Warning: For IB usage only. Directly calling these methods is NOT RECOMMENDED. Use calendar.appearance instead.
|
||||
|
||||
|
||||
#import "FSCalendar.h"
|
||||
|
|
|
|||
|
|
@ -10,13 +10,10 @@
|
|||
//
|
||||
// FSCalendar is a superior awesome calendar control with high performance, high customizablility and very simple usage.
|
||||
//
|
||||
// @warning All NSDate instances used in the calendar should be managed by the DateTools category. See FSCalendar+DateTools.
|
||||
//
|
||||
// @see FSCalendarDataSource
|
||||
// @see FSCalendarDelegate
|
||||
// @see FSCalendarDelegateAppearance
|
||||
// @see FSCalendarAppearance
|
||||
// @see FSCalendar+DateTools
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
|
|
|||
12
README.md
12
README.md
|
|
@ -202,6 +202,18 @@ NSLog(@"Date is %@", string);
|
|||
|
||||
```objc
|
||||
self.gregorian = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
|
||||
```
|
||||
* Get component of NSDate
|
||||
|
||||
```objc
|
||||
NSInteger era = [self.gregorian component:NSCalendarUnitEra fromDate:date];
|
||||
NSInteger year = [self.gregorian component:NSCalendarUnitYear fromDate:date];
|
||||
NSInteger month = [self.gregorian component:NSCalendarUnitMonth fromDate:date];
|
||||
NSInteger day = [self.gregorian component:NSCalendarUnitDay fromDate:date];
|
||||
NSInteger hour = [self.gregorian component:NSCalendarUnitHour fromDate:date];
|
||||
NSInteger minute = [self.gregorian component:NSCalendarUnitMinute fromDate:date];
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
* Get next **month**
|
||||
|
|
|
|||
Loading…
Reference in New Issue