Hey i am trying to compare the date on which the user opens the app to the date it is currently. (basically, how long they've had the app in days)

Here is the code:

```
- (NSInteger) daysAfterDate: (NSDate *) aDate
{
    NSTimeInterval ti = [self timeIntervalSinceDate:aDate]; //#1
    return (NSInteger) (ti / D_DAY); //#2
}  //#3

-(void)load {

        NSDate *birthdate = [prefs objectForKey:@"Birthdate"];

    rock_Age =  daysAfterDate(birthdate);

}

```

errors: 

1.) it tells me incompatible types in initialization
2.) D\_DAY Undecared

warning:

3.) control reaches end of non void function

If i did this completely wrong, (because for the life of me i cannot understand the NSDate class :/) I would gladly take an alternative to doing this :) 

all help is appreciated, 
 Thank you 
 -Jackson Smith