forked from calimarkus/XcodeAutocompleteSnippets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdateFormatterAndTimeZone.codesnippet
More file actions
33 lines (32 loc) · 1.23 KB
/
dateFormatterAndTimeZone.codesnippet
File metadata and controls
33 lines (32 loc) · 1.23 KB
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
32
33
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>dateformatter+timezone</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>CodeBlock</string>
</array>
<key>IDECodeSnippetContents</key>
<string> NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm";
NSTimeZone *gmt = [NSTimeZone timeZoneWithAbbreviation:@"PST"]; // default is GMT
[dateFormatter setTimeZone:gmt];
NSString *timeStamp = [dateFormatter stringFromDate:[NSDate date]];
[dateFormatter release];
</string>
<key>IDECodeSnippetIdentifier</key>
<string>FB9F1B42-4AE8-4537-A28E-60F89F87AD12</string>
<key>IDECodeSnippetLanguage</key>
<string>Xcode.SourceCodeLanguage.Objective-C</string>
<key>IDECodeSnippetSummary</key>
<string>Used for creating a date formatter converted to a specific timezone</string>
<key>IDECodeSnippetTitle</key>
<string>Date Formatter & Time Zone</string>
<key>IDECodeSnippetUserSnippet</key>
<true/>
<key>IDECodeSnippetVersion</key>
<integer>2</integer>
</dict>
</plist>