pt_BR strings updates
[adiumx.git] / Source / AICalendarDate.m
blob3c216e9f82358ce170d6cb353a09612ffeef9775
1 //
2 //  AICalendarDate.m
3 //  Adium
4 //
5 //  Created by Evan Schoenberg on 7/31/06.
6 //
8 #import "AICalendarDate.h"
11 @implementation AICalendarDate
12 /*!
13  * @brief Initialize with coder
14  */
15 - (id)initWithCoder:(NSCoder *)decoder
17         if ((self = [super initWithCoder:decoder])) {
18                 if ([decoder allowsKeyedCoding]) {
19                         granularity = [[decoder decodeObjectForKey:@"Granularity"] intValue];
20                 } else {
21                         granularity = [[decoder decodeObject] intValue];                        
22                 }
23         }
24         
25         return self;
28 - (void)encodeWithCoder:(NSCoder *)encoder
30         [super encodeWithCoder:encoder];
32         if ([encoder allowsKeyedCoding]) {
33         [encoder encodeObject:[NSNumber numberWithInt:granularity] forKey:@"Granularity"];
34                 
35     } else {
36         [encoder encodeObject:[NSNumber numberWithInt:granularity]];
37     }
40 - (id)copyWithZone:(NSZone *)inZone
42         AICalendarDate *newDate = [super copyWithZone:inZone];
43         newDate->granularity = granularity;
45         return newDate;
48 - (void)setGranularity:(AICalendarDateGranularity)inGranularity
50         granularity = inGranularity;
52 - (AICalendarDateGranularity)granularity
54         return granularity;
56 @end