I am creating a custom type calendar and I am trying to see if it is possible to store dates in an array without statically assigning each one. For example the 1st date in the array would be the day it was first created and it would save the next week lets say into the relevant indexes in the array.

```
NSMutableArray *thisWeek = [today, tomorrow, sunday(Feb 24), monday (Feb 25), etc];

```

What would be the best way to go about storing the future dates?
['https://Stackoverflow.com/questions/15029537', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1220097/']
```
NSMutableArray *days = [[NSMutableArray alloc] init]; 
NSCalendar *cal = [NSCalendar autoupdatingCurrentCalendar];
NSDateComponents *tempCop = [cal components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit
                                   fromDate:[NSDate date]];
NSDate *today = [cal dateFromComponents:tempCop];

for (int i = 0; i < 8; i++) 
{
    NSDateComponents *comps = [[NSDateComponents alloc]init];
    [comps setDay:i];
    [days addObject:[cal dateByAddingComponents:comps toDate:today options:0]];     
}

```
Take a look at `dateByAddingTimeInterval:` in the `NSDate` docs ([link](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html)). It lets you add a given amount of seconds to a date.