"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "WebUI/Common/BaseUI/SkyWeekOfYearPopUp.m" between
opengroupware-5.5rc2.tar.gz and opengroupware-5.5rc3.tar.gz

About: OpenGroupware is a branch of the "traditional" OpenGroupware collaboration system (developed in Objective-C on SOPE). Release candidate.

SkyWeekOfYearPopUp.m  (opengroupware-5.5rc2):SkyWeekOfYearPopUp.m  (opengroupware-5.5rc3)
skipping to change at line 83 skipping to change at line 83
dayOffset = [self->item intValue] - 1; dayOffset = [self->item intValue] - 1;
dayOffset *= 7; dayOffset *= 7;
return [self->firstMonday dateByAddingYears:0 months:0 days:dayOffset]; return [self->firstMonday dateByAddingYears:0 months:0 days:dayOffset];
} }
- (NSString *)itemLabel { - (NSString *)itemLabel {
NSCalendarDate *date; NSCalendarDate *date;
static int showYear = -1; static int showYear = -1;
unsigned weekOfYear, year; NSInteger weekOfYear, year;
if (showYear == -1) { if (showYear == -1) {
showYear = [[NSUserDefaults standardUserDefaults] showYear = [[NSUserDefaults standardUserDefaults]
boolForKey:@"SkyWeekOfYearPopUp_showYear"] boolForKey:@"SkyWeekOfYearPopUp_showYear"]
? 1 :0; ? 1 :0;
} }
date = [self itemDate]; date = [self itemDate];
year = [date yearOfCommonEra]; year = [date yearOfCommonEra];
weekOfYear = [date weekOfYear]; weekOfYear = [date weekOfYear];
skipping to change at line 106 skipping to change at line 106
short woy, nowy; short woy, nowy;
woy = [date weekOfYear]; woy = [date weekOfYear];
nowy = [date numberOfWeeksInYear]; nowy = [date numberOfWeeksInYear];
if (woy > nowy) if (woy > nowy)
year++; year++;
} }
if (showYear) { if (showYear) {
return [NSString stringWithFormat:@"%@: %04i-%02i (%02i-%02i)", return [NSString stringWithFormat:@"%@: %04"PRIiPTR"-%02i (%02"PRIiPTR"-%02" PRIiPTR")",
[[self labels] valueForKey:@"week"], [[self labels] valueForKey:@"week"],
year, year,
[self->item intValue], [self->item intValue],
[date monthOfYear], [date monthOfYear],
[date dayOfMonth]]; [date dayOfMonth]];
} }
else { else {
return [NSString stringWithFormat:@"%@: %02i (%02i-%02i)", return [NSString stringWithFormat:@"%@: %02i (%02"PRIiPTR"-%02"PRIiPTR")",
[[self labels] valueForKey:@"week"], [[self labels] valueForKey:@"week"],
[self->item intValue], [self->item intValue],
[date monthOfYear], [date monthOfYear],
[date dayOfMonth]]; [date dayOfMonth]];
} }
} }
- (NSTimeZone *)timeZone { - (NSTimeZone *)timeZone {
NSTimeZone *tz; NSTimeZone *tz;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS