[Mono-osx] MonoMac patch to add NSDate/NSTimeZone selectors

Duane Wandless duane at wandless.net
Sat Jul 10 14:02:04 EDT 2010


That change was to distinguish from this addition:
+ [Export ("secondsFromGMT")]
+ int SecondsFromGMT { get; }

There are two selectors, secondsFromGMTForDate and secondsFromGMT.  The one
just returns the seconds from GMT for the timezone.  The other returns
seconds from GMT for the given date.

I guess in theory the secondsFromGMT can be satisfied by passing an NSDate
of now into the secondsFromGMTForDate.  I just liked the convenience of the
single call.

Duane

On Sat, Jul 10, 2010 at 12:10 PM, Miguel de Icaza <miguel at novell.com> wrote:

> Hello Duane,
>
>    I noticed this:
>
>   [Export ("secondsFromGMTForDate:")]
> - int SecondsFromGMT (NSDate date);
> + int SecondsFromGMTForDate (NSDate date);
>
>     What ist he rationale for this change?
>
>     I changed the NSTimeZone.WithName to match the pattern used in MonoMac
> and MonoTouch to make it "FromName" instead.
>
> On Fri, Jul 9, 2010 at 12:13 PM, Duane Wandless <duane at wandless.net>wrote:
>
>> Bind NSDate dateWithTimeIntervalSinceNow.
>> Bind NSTimeZone timeZoneWithName
>> Bind NSTimeZone localTimeZone
>> Bind NSTimeZone description
>> Bind NSTimeZone secondsFromGMT
>> Rename binding for NSTimeZone secondsFromGMTForDate
>> to SecondsFromGMTForDate (from secondsFromGMT)
>>
>> Fix binding for NSMutableUrlRequest setValue:forHTTPHeaderField
>>
>>
>> NSTimeZone should expose both secondsFromGMTForDate and secondsFromGMT.
>>
>> As far as I can tell the binding for SetValue is required as trying to use
>> the Headers NSDictionary cannot work, as an NSDictionary is readonly.
>>
>> Duane
>>
>> _______________________________________________
>> Mono-osx mailing list
>> Mono-osx at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20100710/27388512/attachment.html 


More information about the Mono-osx mailing list