mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +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,3 +1,13 @@
|
||||
2008-03-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/Scheduler/UIxCalMonthViewOld.m ([UIxCalMonthViewOld
|
||||
-endDate]): removed useless method.
|
||||
|
||||
* SoObjects/SOGo/NSCalendarDate+SOGo.m
|
||||
([-dayOfWeeK:_dayoffsetFromSunday:_offset]): removed useless
|
||||
method.
|
||||
([-sundayOfWeek]): removed useless method.
|
||||
|
||||
2008-03-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OGoContentStore/OCSContactFieldExtractor.m
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -7,27 +7,20 @@
|
||||
|
||||
@implementation UIxCalMonthViewOld
|
||||
|
||||
- (NSCalendarDate *)startOfMonth {
|
||||
- (NSCalendarDate *) startOfMonth
|
||||
{
|
||||
return [[[super startDate] firstDayOfMonth] beginOfDay];
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)startDate {
|
||||
- (NSCalendarDate *) startDate
|
||||
{
|
||||
return [[self startOfMonth] mondayOfWeek];
|
||||
}
|
||||
|
||||
- (NSCalendarDate *)endDate {
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [self startOfMonth];
|
||||
date = [date dateByAddingYears:0 months:0 days:[date numberOfDaysInMonth]
|
||||
hours:0 minutes:0 seconds:0];
|
||||
date = [[date sundayOfWeek] endOfDay];
|
||||
return date;
|
||||
}
|
||||
|
||||
/* URLs */
|
||||
|
||||
- (NSDictionary *)prevMonthQueryParameters {
|
||||
- (NSDictionary *) prevMonthQueryParameters
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self startOfMonth] dateByAddingYears:0 months:-1 days:0
|
||||
@@ -35,7 +28,8 @@
|
||||
return [self queryParametersBySettingSelectedDate:date];
|
||||
}
|
||||
|
||||
- (NSDictionary *)nextMonthQueryParameters {
|
||||
- (NSDictionary *)nextMonthQueryParameters
|
||||
{
|
||||
NSCalendarDate *date;
|
||||
|
||||
date = [[self startOfMonth] dateByAddingYears:0 months:1 days:0
|
||||
|
||||
Reference in New Issue
Block a user