Re: Why is the first of March a Tuesday
Re: Why is the first of March a Tuesday
- Subject: Re: Why is the first of March a Tuesday
- From: "Gary L. Wade" <email@hidden>
- Date: Fri, 25 Mar 2016 09:18:17 -0700
The documentation needs to be more descriptive. The word "wrap" in the name of the option should fill in the missing reason. Feel free to file a radar.
--
Gary L. Wade (Sent from my iPad)
http://www.garywade.com/
> On Mar 25, 2016, at 9:09 AM, Gerriet M. Denkmann <email@hidden> wrote:
>
>
>>> On 25 Mar 2016, at 23:01, Clark Cox <email@hidden> wrote:
>>>
>>>
>>> On Mar 25, 2016, at 08:43, Gerriet M. Denkmann <email@hidden> wrote:
>>>
>>> In my calendar 2016/3/1 is a Friday, but:
>>
>>
>> Something's wrong with your calendar then :). March 1, 2016 *is* a Tuesday:
>
> Yes, sorry for the noise.
> I was adding 7 days to today and got 1. of March but expected 1. of April. (see my post about adding days).
>
> Turns out that NSCalendarWrapComponents = “Specifies that the operation should use arithmetic for calendar addition.” is the wrong choice.
> Without using “arithmetic" (instead using divination ?) I get the expected result.
>
> Kind regards
>
> Gerriet.
>
>>
>> % cal
>> March 2016
>> Su Mo Tu We Th Fr Sa
>> 1 2 3 4 5
>> 6 7 8 9 10 11 12
>> 13 14 15 16 17 18 19
>> 20 21 22 23 24 25 26
>> 27 28 29 30 31
>>
>>
>>>
>>> - (NSString *)timerStringFor: (NSDate *)date
>>> {
>>> NSDateFormatter *dateFormatter = [ [ NSDateFormatter alloc ] init];
>>> dateFormatter.dateFormat = @"EEE dd MMM yyyy HH:mm:ss ZZZ";
>>> NSString *un = [ dateFormatter stringFromDate: date ];
>>> NSLog(@"%s %@",__FUNCTION__, un); // Tue 01 Mar 2016 01:00:00 +0700
>>> return un;
>>> }
>>>
>>> prints “Tue 01 Mar 2016 01:00:00 +0700”
>>>
>>> What am I doing wrong?
>>>
>>> Gerriet.
>>>
>>> Mac OS X 10.10.5
>>>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden