<commit_before># AFHorizontalDayPicker

[![CI Status](http://img.shields.io/travis/<NAME>/AFHorizontalDayPicker.svg?style=flat)](https://travis-ci.org/<NAME>/AFHorizontalDayPicker)
[![Version](https://img.shields.io/cocoapods/v/AFHorizontalDayPicker.svg?style=flat)](http://cocoapods.org/pods/AFHorizontalDayPicker)
[![License](https://img.shields.io/cocoapods/l/AFHorizontalDayPicker.svg?style=flat)](http://cocoapods.org/pods/AFHorizontalDayPicker)
[![Platform](https://img.shields.io/cocoapods/p/AFHorizontalDayPicker.svg?style=flat)](http://cocoapods.org/pods/AFHorizontalDayPicker)

[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/2.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/2.png)
[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/3.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/3.png)
[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/4.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/4.png)
[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/5.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/5.png)

## Installation

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

```ruby
pod "AFHorizontalDayPicker"
```

## Usage

Install library via cocoapods as it describe above, then add property

``` objective-c
@property (strong, nonatomic) AFHorizontalDayPicker *picker;
```

Init then setup picker using start and end dates:

``` objective-c
- (void)viewDidLoad
{
[super viewDidLoad];

AFHorizontalDayPicker *picker = [[AFHorizontalDayPicker alloc] initWithFrame:CGRectMake(0, 40, self.view.frame.size.width, 60.0f)];
picker.delegate = self;
picker.startDate = [[NSDate date] mt_dateDaysBefore:7];
picker.endDate = [[NSDate date] mt_dateDaysAfter:14];
[picker selectTodayAnimated:NO];

[self.view addSubview:picker];
}
```

Implement the required delegate method to be notified when a new day item is selected and configure picker cell width (cell height will be same as the controll height)

``` objective-c

- (CGFloat)horizontalDayPicker:(AFHorizontalDayPicker *)picker widthForItemWithDate:(NSDate *)date{
return 60.0f;
}

- (void)horizontalDayPicker:(AFHorizontalDayPicker *)picker didSelectDate:(NSDate *)date{
NSLog(@"selected date %@", date);
}<commit_msg>format issues<commit_after># AFHorizontalDayPicker

[![CI Status](http://img.shields.io/travis/<NAME>/AFHorizontalDayPicker.svg?style=flat)](https://travis-ci.org/<NAME>/AFHorizontalDayPicker)
[![Version](https://img.shields.io/cocoapods/v/AFHorizontalDayPicker.svg?style=flat)](http://cocoapods.org/pods/AFHorizontalDayPicker)
[![License](https://img.shields.io/cocoapods/l/AFHorizontalDayPicker.svg?style=flat)](http://cocoapods.org/pods/AFHorizontalDayPicker)
[![Platform](https://img.shields.io/cocoapods/p/AFHorizontalDayPicker.svg?style=flat)](http://cocoapods.org/pods/AFHorizontalDayPicker)

[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/2.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/2.png)
[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/3.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/3.png)
[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/4.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/4.png)
[![](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/5.png)](https://raw.github.com/alexfedosov/AFHorizontalDayPicker/master/Screens/5.png)

## Installation

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

```ruby
pod "AFHorizontalDayPicker"
```

## Usage

Install library via cocoapods as it describe above, then add property

``` objective-c
@property (strong, nonatomic) AFHorizontalDayPicker *picker;
```

Init then setup picker using start and end dates:

``` objective-c
- (void)viewDidLoad
{
    [super viewDidLoad];

    AFHorizontalDayPicker *picker = [[AFHorizontalDayPicker alloc] initWithFrame:CGRectMake(0, 40, self.view.frame.size.width, 60.0f)];
    picker.delegate = self;
    picker.startDate = [[NSDate date] mt_dateDaysBefore:7];
    picker.endDate = [[NSDate date] mt_dateDaysAfter:14];
    [picker selectTodayAnimated:NO];

    [self.view addSubview:picker];
}
```

Implement the required delegate method to be notified when a new day item is selected and configure picker cell width (cell height will be same as the controll height)

``` objective-c

- (CGFloat)horizontalDayPicker:(AFHorizontalDayPicker *)picker widthForItemWithDate:(NSDate *)date{
    return 60.0f;
}

- (void)horizontalDayPicker:(AFHorizontalDayPicker *)picker didSelectDate:(NSDate *)date{
    NSLog(@"selected date %@", date);
}
{'fraction_non_alphanumeric': 0.1507557677008751, 'fraction_numerical': 0.007955449482895784, 'mean_word_length': 6.528443113772455, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 24, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1932920', 'n_tokens_mistral': 1772, 'n_tokens_neox': 1637, 'n_words': 255}