Skip to content

NSCalendar rangeOfUnit:inUnit:forDate: not implemented #1

Open
@AlessandroSangiuliano

Description

@AlessandroSangiuliano

Hello, I've a different behavior of NSCalendar that makes my little App to work on OS X 10.10, 10.6.8, but not on GNUstep.

I wrote the App on 10.10, then ported on 10.6.8 to make compatible GNUstep nibs/xibs, then ported on GNUstep.

The problem seems to come from the line 59 in AppDelegate.m, when trying to calculate an NSRange:

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?

You can look the code on github:

https://github.com/AlessandroSangiuliano/Calendar

In the OSX directory there is the OS X version of the App.

Best Regards,

Alex.

P.S: I sent this mail two times on the discuXX-gnustXX mailing list, one yesterday and one this morning, but seems my mails are no more accepted by the server for some reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUse this tag for reporting bugs or issues that impede the software's normal functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions