Monthly numbering starts at 1, and this month "Tishri."
Right.
During the non-wood year, Adar is month number 7, not 6.
Technically incorrect. (More on this below)
In the leap year of Adar, I am number 6, and Adar II is number 7.
Right.
βNisanβ is always 8, and so on to βElul,β which is always 13.
Right.
So what about Adar in a non-leap year? I ran this code to find out:
@autoreleasepool { NSDate *today = [NSDate date]; NSCalendar *hebrew = [[NSCalendar alloc] initWithCalendarIdentifier:NSHebrewCalendar]; NSDateComponents *diff = [[NSDateComponents alloc] init]; NSDateFormatter *f = [[NSDateFormatter alloc] init]; [f setDateFormat:@"d MMMM y"]; [f setCalendar:hebrew]; for (NSInteger i = 0; i < 19; ++i) { NSDateComponents *comp = [[NSDateComponents alloc] init]; [comp setYear:5772 + i]; [comp setDay:1]; NSLog(@"============= %d ============", [comp year]); for (NSInteger i = 1; i <= 13; ++i) { [comp setMonth:i]; NSDate *d = [hebrew dateFromComponents:comp]; NSLog(@"%d: %@ (%@)", i, [f stringFromDate:d], d); } } }
In a leap year, this will record what you expect:
For each increment of the month component, we get a different date. But when we run this in a non-leap year, we get the following:
Here we see that the months 6 and 7 will be evaluated by Adar. Thus, Adar is both the sixth and seventh month in off-peak years.
In addition, since we know that year 5790 is a leap year, we can derive a simpler implementation of the -isHebrewLeapYear: method:
- (BOOL) isHebrewLeapYear:(NSInteger)year{ return year % 19 == 14; }
Strike>