diff --git a/ChangeLog b/ChangeLog index ed0a709c0..1df164867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-10-04 Wolfgang Sourdeau + * UI/Scheduler/NSCalendarDate+Scheduler.m ([NSCalendarDate + -shortDateString]): new method that will return a "short date + string" (yyyymmdd) from a calendar date object. + * UI/SOGoUI/UIxComponent.m ([UIxComponent -_cDateFromShortDateString:dateStringandShortTimeString:timeString]): new method to compute the selected date from the "day" and "hm" query parameters (if found). This method replaces the old algorithm that was found in the "selectedDate" method. diff --git a/UI/Scheduler/NSCalendarDate+Scheduler.h b/UI/Scheduler/NSCalendarDate+Scheduler.h index 48029e38c..18bcd310c 100644 --- a/UI/Scheduler/NSCalendarDate+Scheduler.h +++ b/UI/Scheduler/NSCalendarDate+Scheduler.h @@ -30,6 +30,7 @@ - (NSCalendarDate *) dayOfWeeK: (unsigned) _day offsetFromSunday: (unsigned) _off; - (NSCalendarDate *) sundayOfWeek; +- (NSString *) shortDateString; @end diff --git a/UI/Scheduler/NSCalendarDate+Scheduler.m b/UI/Scheduler/NSCalendarDate+Scheduler.m index 87c0169ab..e736217da 100644 --- a/UI/Scheduler/NSCalendarDate+Scheduler.m +++ b/UI/Scheduler/NSCalendarDate+Scheduler.m @@ -54,4 +54,16 @@ return [self dayOfWeeK:6 offsetFromSunday:1]; } +- (NSString *) shortDateString +{ + NSString *str; + + str = [NSString stringWithFormat: @"%.4d%.2d%.2d", + [self yearOfCommonEra], + [self monthOfYear], + [self dayOfMonth]]; + + return str; +} + @end