nscalendar
Is current NSDate in local timezone within range of start and end NSDates in another timezone?
I need to determine if a user\'s current NSDate (local time zone) falls in the range of two NSDates belonging to other time zones.[详细]
2023-01-25 12:07 分类:问答NSCalendar problem with BC era
Greetings, Recently I faced a big problem (as it seems to me) with NSCalendar class. In my task I need to work with a large time periods starting from 4000BC to 2000AD (Gregorian calendar). In some[详细]
2023-01-16 11:52 分类:问答NSDate get year/month/day
How can I get the year/month/day of a NSDate object, given no other information? I realize that I could probably do this with something similar to this:[详细]
2023-01-16 00:53 分类:问答How to clear NSDate milliseconds
I want to keep date/times in a CoreData store with no seconds or milliseconds.(I\'m doing some processing to round times off, and stray seconds/milliseconds become a monkey wrench.)It\'s easy enough t[详细]
2023-01-14 14:07 分类:问答iPhone NSDate eg. next Friday
I want to create a function which results the dat开发者_高级运维e of next Friday but I have no plan how to do it. Has anyone a good hint to me ?E.g. Get current date using NSDate, then use \'component[详细]
2022-12-31 11:56 分类:问答NSCalendar: Problem getting weeks in a month
I am creating a calendar control of sorts... One thing I need to know is how many weeks are there in a Month...[详细]
2022-12-23 09:15 分类:问答How to determine if an NSDate is today?
How to check if an NSDate belongs to today? I used to check it using first 10 characters from [aDate description]. [[aDate description] substringToIndex:10] returns string like \"YYY开发者_JS百科Y-MM[详细]
2022-12-21 17:20 分类:问答Does -[NSCalendar ordinalityOfUnit:inUnit:forDate:] not work?
I have the following code in my program: NSUInteger currentMinuteOrdinal = [[NSCalendar currentCalendar] ordinalityOfUnit:NSMinuteCalendarUnit inUnit:NSEraCalendarUnit forDate:[NSDate date]];[详细]
2022-12-14 13:10 分类:问答