Skip to content

Commit

Permalink
implement generateDateWithDay method
Browse files Browse the repository at this point in the history
  • Loading branch information
Husseinhj committed Nov 21, 2017
1 parent 4f75fad commit 69de344
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ios_calendar/Sources/CalendarView.m
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,18 @@ - (NSDateComponents *) generateDateComponents{
return components;
}

- (NSDate *) generateDateWithDay:(NSInteger) day month:(NSInteger) month year:(NSInteger) year{
NSDateComponents *components = [self generateDateComponents];

[components setYear:year];
[components setMonth:month];
[components setDay:day];
[components setHour:0];
[components setMinute:0];
[components setSecond:0];

return [components.calendar dateFromComponents:components];
}
#pragma mark - Generating of rects

- (void)generateDayRects
Expand Down

0 comments on commit 69de344

Please sign in to comment.