Monotone-Parent: 7e4012769b937d5a36d8043bf2b2b1392a61a376

Monotone-Revision: 80db3a8d981db50d62440996464d82ff2c6cac2c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-10-05T23:27:30
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-10-05 23:27:30 +00:00
parent f28a25cb70
commit 3109843a6f
3 changed files with 28 additions and 46 deletions

View File

@@ -1,3 +1,9 @@
2006-10-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/NSCalendarDate+SOGo.m ([NSCalendarDate -adjustedDate])
([NSCalendarDate -driftedDate]): methods made useless by a better
comprehension of the NSTimeZone API...
2006-10-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/SOGoUI/UIxComponent.m ([UIxComponent -selectedDate]): call

View File

@@ -33,10 +33,6 @@
andShortTimeString: (NSString *) timeString
inTimeZone: (NSTimeZone *) timeZone;
/* a date tuned to its timezone when initialized with local values */
- (NSCalendarDate *) adjustedDate;
- (NSCalendarDate *) driftedDate;
- (BOOL) isDateInSameMonth: (NSCalendarDate *) _other;
- (NSCalendarDate *) dayOfWeeK: (unsigned) _day
offsetFromSunday: (unsigned) _off;

View File

@@ -32,24 +32,6 @@
unsigned int year, month, day, hour, minute, total;
NSCalendarDate *cDate, *tmpDate;
if (dateString && [dateString length] == 8)
{
total = [dateString intValue];
year = total / 10000;
total -= year * 10000;
month = total / 100;
day = total - (month * 100);
}
else
{
tmpDate = [NSCalendarDate calendarDate];
tmpDate = [tmpDate addYear: 0 month: 0 day: 0 hour: 0 minute: 0
second: [timeZone secondsFromGMT]];
year = [tmpDate yearOfCommonEra];
month = [tmpDate monthOfYear];
day = [tmpDate dayOfMonth];
}
if (timeString && [timeString length] == 4)
{
total = [timeString intValue];
@@ -62,31 +44,29 @@
minute = 0;
}
cDate = [self dateWithYear: year month: month day: day
hour: hour minute: minute second: 0
timeZone: timeZone];
if (dateString && [dateString length] == 8)
{
total = [dateString intValue];
year = total / 10000;
total -= year * 10000;
month = total / 100;
day = total - (month * 100);
cDate = [self dateWithYear: year month: month day: day
hour: hour minute: minute second: 0
timeZone: timeZone];
}
else
{
tmpDate = [NSCalendarDate calendarDate];
[tmpDate setTimeZone: timeZone];
cDate = [self dateWithYear: [tmpDate yearOfCommonEra]
month: [tmpDate monthOfYear]
day: [tmpDate dayOfMonth]
hour: hour minute: minute second: 0
timeZone: timeZone];
}
return [cDate adjustedDate];
}
- (NSCalendarDate *) adjustedDate
{
NSTimeZone *dTZ;
dTZ = [self timeZone];
return [self addYear: 0 month: 0 day: 0 hour: 0 minute: 0
second: -[dTZ secondsFromGMT]];
}
- (NSCalendarDate *) driftedDate
{
NSTimeZone *dTZ;
dTZ = [self timeZone];
return [self addYear: 0 month: 0 day: 0 hour: 0 minute: 0
second: [dTZ secondsFromGMT]];
return cDate;
}
- (BOOL) isDateInSameMonth: (NSCalendarDate *) _other