mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-11 14:57:12 +00:00
Monotone-Parent: 64430bce96a9562bf8914d9e581ba26e9cbf2a9a
Monotone-Revision: bc311597c5a4c1c647788bac37a0fdde7698b399 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-03-10T14:17:11 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
7ed2beb6d3
commit
f80513f3df
4 files changed
+19
-41
No files matched your search
@@ -34,11 +34,8 @@
|
||||
inTimeZone: (NSTimeZone *) timeZone;
|
||||
|
||||
- (BOOL) isDateInSameMonth: (NSCalendarDate *) _other;
|
||||
- (NSCalendarDate *) dayOfWeeK: (unsigned) _day
|
||||
offsetFromSunday: (unsigned) _off;
|
||||
- (NSCalendarDate *) sundayOfWeek;
|
||||
- (NSString *) shortDateString;
|
||||
|
||||
- (NSString *) shortDateString;
|
||||
- (NSString *) rfc822DateString;
|
||||
|
||||
+ (id) distantFuture;
|
||||
|
||||
@@ -83,29 +83,6 @@ static NSString *rfc822Months[] = {@"", @"Jan", @"Feb", @"Mar", @"Apr",
|
||||
([_other monthOfYear] == [self monthOfYear]));
|
||||
}
|
||||
|
||||
- (NSCalendarDate *) dayOfWeeK: (unsigned) _day
|
||||
offsetFromSunday: (unsigned) _offset
|
||||
{
|
||||
unsigned dayOfWeek, distance;
|
||||
|
||||
/* perform "locale" correction */
|
||||
dayOfWeek = (7 + [self dayOfWeek] - _offset) % 7;
|
||||
|
||||
_day = (_day % 7);
|
||||
if(_day == dayOfWeek)
|
||||
return self;
|
||||
|
||||
distance = _day - dayOfWeek;
|
||||
return [self dateByAddingYears:0 months:0 days:distance];
|
||||
}
|
||||
|
||||
/* this implies that monday is the start of week! */
|
||||
|
||||
- (NSCalendarDate *) sundayOfWeek
|
||||
{
|
||||
return [self dayOfWeeK:6 offsetFromSunday:1];
|
||||
}
|
||||
|
||||
- (NSString *) shortDateString
|
||||
{
|
||||
NSString *str;
|
||||
|
||||
Reference in new issue
Block a user