|
From: | Riccardo Mottola |
Subject: | Re: Fwd: NSCalendar behavior |
Date: | Sun, 01 Mar 2015 11:06:30 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 |
Hi, Alessandro Sangiuliano wrote:
NSRange range = [gregorian rangeOfUnit:NSDayCalendarUnit inUnit:NSMonthCalendarUnit forDate: [gregorian dateFromComponents:components]];monthDays = range.length; NSLog(@"Numbers of Days %ld", monthDays);From the NSLog I can see that monthDays is "0", insted on OS X is 28 (for february, 31 for Jan, and so on). What I wrong?
Have you checked out the components? e.g. is "gregorian" valid? components?Can you split this code up in a small example that can be run from the command line? so I can compare how it works on 10.6 and 10.4 for example and see if it works on GNUstep, debug, etc etc.
Riccardo
[Prev in Thread] | Current Thread | [Next in Thread] |