Fixing compile warnings for 64-bit compilation and for deprecated [NSDateComponents setWeek:] usage