annotate dstep/foundation/NSTimeZone.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents 89f3c3ef1fd2
children b9de51448c6b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
1 /**
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
3 * Authors: Jacob Carlborg
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
4 * Version: Initial created: Aug 3, 2009
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
6 */
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
7 module dstep.foundation.NSTimeZone;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
8
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
9 import dstep.foundation.NSArray;
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
10 import dstep.foundation.NSCoder;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
11 import dstep.foundation.NSData;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
12 import dstep.foundation.NSDate;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
13 import dstep.foundation.NSDictionary;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
14 import dstep.foundation.NSLocale;
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
15 import dstep.foundation.NSObjCRuntime;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
16 import dstep.foundation.NSObject;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
17 import dstep.foundation.NSString;
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
18 import dstep.foundation.NSZone;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
19 import dstep.objc.bridge.Bridge;
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
20 import dstep.objc.objc;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
21 import bindings = dstep.foundation.NSTimeZone_bindings;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
22
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
23 alias NSInteger NSTimeZoneNameStyle;
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
24
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
25 private NSString NSSystemTimeZoneDidChangeNotification_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
26
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
27 NSString NSSystemTimeZoneDidChangeNotification ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
28 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
29 if (NSSystemTimeZoneDidChangeNotification_)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
30 return NSSystemTimeZoneDidChangeNotification_;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
31
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
32 return NSSystemTimeZoneDidChangeNotification_ = new NSString(bindings.NSSystemTimeZoneDidChangeNotification);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
33 }
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
34
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
35 enum
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
36 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
37 NSTimeZoneNameStyleStandard,
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
38 NSTimeZoneNameStyleShortStandard,
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
39 NSTimeZoneNameStyleDaylightSaving,
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
40 NSTimeZoneNameStyleShortDaylightSaving
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
41 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
42
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
43 const TNSExtendedTimeZone = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
44
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
45 static NSTimeZone systemTimeZone ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
46 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
47 return invokeObjcSuperClass!(NSTimeZone, "systemTimeZone");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
48 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
49
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
50 static void resetSystemTimeZone ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
51 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
52 return invokeObjcSuperClass!(void, "resetSystemTimeZone");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
53 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
54
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
55 static NSTimeZone defaultTimeZone ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
56 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
57 return invokeObjcSuperClass!(NSTimeZone, "defaultTimeZone");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
58 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
59
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
60 static void setDefaultTimeZone (NSTimeZone aTimeZone)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
61 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
62 return invokeObjcSuperClass!(void, "setDefaultTimeZone:", NSTimeZone)(aTimeZone);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
63 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
64
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
65 static NSTimeZone localTimeZone ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
66 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
67 return invokeObjcSuperClass!(NSTimeZone, "localTimeZone");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
68 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
69
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
70 static NSArray knownTimeZoneNames ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
71 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
72 return invokeObjcSuperClass!(NSArray, "knownTimeZoneNames");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
73 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
74
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
75 static NSDictionary abbreviationDictionary ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
76 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
77 return invokeObjcSuperClass!(NSDictionary, "abbreviationDictionary");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
78 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
79
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
80 NSInteger secondsFromGMT ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
81 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
82 return invokeObjcSelf!(NSInteger, "secondsFromGMT");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
83 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
84
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
85 NSString abbreviation ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
86 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
87 return invokeObjcSelf!(NSString, "abbreviation");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
88 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
89
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
90 bool isDaylightSavingTime ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
91 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
92 return invokeObjcSelf!(bool, "isDaylightSavingTime");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
93 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
94
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
95 double daylightSavingTimeOffset ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
96 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
97 return invokeObjcSelf!(double, "daylightSavingTimeOffset");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
98 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
99
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
100 NSDate nextDaylightSavingTimeTransition ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
101 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
102 return invokeObjcSelf!(NSDate, "nextDaylightSavingTimeTransition");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
103 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
104
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
105 NSString description ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
106 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
107 return invokeObjcSelf!(NSString, "description");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
108 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
109
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
110 bool isEqualToTimeZone (NSTimeZone aTimeZone)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
111 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
112 return invokeObjcSelf!(bool, "isEqualToTimeZone:", NSTimeZone)(aTimeZone);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
113 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
114
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
115 NSString localizedName (int style, NSLocale locale)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
116 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
117 return invokeObjcSelf!(NSString, "localizedName:locale:", int, NSLocale)(style, locale);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
118 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
119 `;
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
120
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
121 const TNSTimeZoneCreation = `
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
122
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
123 static Object timeZoneWithName (NSString tzName)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
124 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
125 return invokeObjcSuperClass!(Object, "timeZoneWithName:", NSString)(tzName);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
126 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
127
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
128 static Object timeZoneWithName (NSString tzName, NSData aData)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
129 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
130 return invokeObjcSuperClass!(Object, "timeZoneWithName:data:", NSString, NSData)(tzName, aData);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
131 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
132
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
133 Object initWithName (NSString tzName)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
134 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
135 return invokeObjcSelf!(Object, "initWithName:", NSString)(tzName);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
136 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
137
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
138 this (NSString tzName)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
139 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
140 typeof(this).alloc.initWithName(tzName);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
141 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
142
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
143 Object initWithName (NSString tzName, NSData aData)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
144 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
145 return invokeObjcSelf!(Object, "initWithName:data:", NSString, NSData)(tzName, aData);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
146 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
147
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
148 this (NSString tzName, NSData aData)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
149 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
150 typeof(this).alloc.initWithName(tzName, aData);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
151 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
152
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
153 static Object timeZoneForSecondsFromGMT (NSInteger seconds)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
154 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
155 return invokeObjcSuperClass!(Object, "timeZoneForSecondsFromGMT:", NSInteger)(seconds);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
156 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
157
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
158 static Object timeZoneWithAbbreviation (NSString abbreviation)
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
159 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
160 return invokeObjcSuperClass!(Object, "timeZoneWithAbbreviation:", NSString)(abbreviation);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
161 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
162 `;
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
163
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
164 class NSTimeZone : NSObject, INSCopying, INSCoding
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
165 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
166 mixin (ObjcWrap);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
167
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
168 this ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
169 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
170 super(typeof(this).alloc.init.objcObject);
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
171 }
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
172
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
173 typeof(this) init ()
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
174 {
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
175 return invokeObjcSelf!(typeof(this), "init");
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
176 }
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
177
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
178 NSString name ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
179 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
180 return invokeObjcSelf!(NSString, "name");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
181 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
182
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
183 NSData data ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
184 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
185 return invokeObjcSelf!(NSData, "data");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
186 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
187
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
188 NSInteger secondsFromGMTForDate (NSDate aDate)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
189 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
190 return invokeObjcSelf!(NSInteger, "secondsFromGMTForDate:", NSDate)(aDate);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
191 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
192
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
193 NSString abbreviationForDate (NSDate aDate)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
194 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
195 return invokeObjcSelf!(NSString, "abbreviationForDate:", NSDate)(aDate);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
196 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
197
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
198 bool isDaylightSavingTimeForDate (NSDate aDate)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
199 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
200 return invokeObjcSelf!(bool, "isDaylightSavingTimeForDate:", NSDate)(aDate);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
201 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
202
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
203 double daylightSavingTimeOffsetForDate (NSDate aDate)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
204 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
205 return invokeObjcSelf!(double, "daylightSavingTimeOffsetForDate:", NSDate)(aDate);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
206 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
207
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
208 NSDate nextDaylightSavingTimeTransitionAfterDate (NSDate aDate)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
209 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
210 return invokeObjcSelf!(NSDate, "nextDaylightSavingTimeTransitionAfterDate:", NSDate)(aDate);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
211 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
212
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
213 Object copyWithZone (NSZone* zone)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
214 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
215 return invokeObjcSelf!(Object, "copyWithZone:", NSZone*)(zone);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
216 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
217
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
218 void encodeWithCoder (NSCoder aCoder)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
219 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
220 return invokeObjcSelf!(void, "encodeWithCoder:", NSCoder)(aCoder);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
221 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
222
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
223 Object initWithCoder (NSCoder aDecoder)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
224 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
225 return invokeObjcSelf!(Object, "initWithCoder:", NSCoder)(aDecoder);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
226 }
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
227
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
228 this (NSCoder aDecoder)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
229 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
230 typeof(this).alloc.initWithCoder(aDecoder);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
231 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
232
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
233 // TNSExtendedTimeZone
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
234 static NSTimeZone systemTimeZone ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
235 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
236 return invokeObjcSuperClass!(NSTimeZone, "systemTimeZone");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
237 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
238
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
239 static void resetSystemTimeZone ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
240 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
241 return invokeObjcSuperClass!(void, "resetSystemTimeZone");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
242 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
243
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
244 static NSTimeZone defaultTimeZone ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
245 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
246 return invokeObjcSuperClass!(NSTimeZone, "defaultTimeZone");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
247 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
248
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
249 static void setDefaultTimeZone (NSTimeZone aTimeZone)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
250 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
251 return invokeObjcSuperClass!(void, "setDefaultTimeZone:", NSTimeZone)(aTimeZone);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
252 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
253
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
254 static NSTimeZone localTimeZone ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
255 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
256 return invokeObjcSuperClass!(NSTimeZone, "localTimeZone");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
257 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
258
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
259 static NSArray knownTimeZoneNames ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
260 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
261 return invokeObjcSuperClass!(NSArray, "knownTimeZoneNames");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
262 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
263
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
264 static NSDictionary abbreviationDictionary ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
265 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
266 return invokeObjcSuperClass!(NSDictionary, "abbreviationDictionary");
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
267 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
268
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
269 NSInteger secondsFromGMT ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
270 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
271 return invokeObjcSelf!(NSInteger, "secondsFromGMT");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
272 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
273
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
274 NSString abbreviation ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
275 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
276 return invokeObjcSelf!(NSString, "abbreviation");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
277 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
278
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
279 bool isDaylightSavingTime ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
280 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
281 return invokeObjcSelf!(bool, "isDaylightSavingTime");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
282 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
283
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
284 double daylightSavingTimeOffset ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
285 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
286 return invokeObjcSelf!(double, "daylightSavingTimeOffset");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
287 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
288
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
289 NSDate nextDaylightSavingTimeTransition ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
290 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
291 return invokeObjcSelf!(NSDate, "nextDaylightSavingTimeTransition");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
292 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
293
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
294 NSString description ()
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
295 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
296 return invokeObjcSelf!(NSString, "description");
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
297 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
298
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
299 bool isEqualToTimeZone (NSTimeZone aTimeZone)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
300 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
301 return invokeObjcSelf!(bool, "isEqualToTimeZone:", NSTimeZone)(aTimeZone);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
302 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
303
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
304 NSString localizedName (int style, NSLocale locale)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
305 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
306 return invokeObjcSelf!(NSString, "localizedName:locale:", int, NSLocale)(style, locale);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
307 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
308
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
309 // TNSTimeZoneCreation
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
310 static Object timeZoneWithName (NSString tzName)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
311 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
312 return invokeObjcSuperClass!(Object, "timeZoneWithName:", NSString)(tzName);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
313 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
314
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
315 static Object timeZoneWithName (NSString tzName, NSData aData)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
316 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
317 return invokeObjcSuperClass!(Object, "timeZoneWithName:data:", NSString, NSData)(tzName, aData);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
318 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
319
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
320 Object initWithName (NSString tzName)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
321 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
322 return invokeObjcSelf!(Object, "initWithName:", NSString)(tzName);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
323 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
324
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
325 this (NSString tzName)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
326 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
327 typeof(this).alloc.initWithName(tzName);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
328 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
329
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
330 Object initWithName (NSString tzName, NSData aData)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
331 {
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
332 return invokeObjcSelf!(Object, "initWithName:data:", NSString, NSData)(tzName, aData);
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
333 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
334
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
335 this (NSString tzName, NSData aData)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
336 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
337 typeof(this).alloc.initWithName(tzName, aData);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
338 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
339
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
340 static Object timeZoneForSecondsFromGMT (NSInteger seconds)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
341 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
342 return invokeObjcSuperClass!(Object, "timeZoneForSecondsFromGMT:", NSInteger)(seconds);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
343 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
344
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
345 static Object timeZoneWithAbbreviation (NSString abbreviation)
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
346 {
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
347 return invokeObjcSuperClass!(Object, "timeZoneWithAbbreviation:", NSString)(abbreviation);
14
89f3c3ef1fd2 Added the Foundation framework
Jacob Carlborg <doob@me.com>
parents:
diff changeset
348 }
16
19885b43130e Huge update, the bridge actually works now
Jacob Carlborg <doob@me.com>
parents: 14
diff changeset
349 }