Browse Source

deleting old methods.

v1.4.1
Abhishek Banthia 8 years ago
parent
commit
a8472ba4bb
  1. BIN
      Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate
  2. 16
      Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 58
      Clocker/Model/CLTimezoneDataOperations.m

BIN
Clocker.xcodeproj/project.xcworkspace/xcuserdata/abhishekbanthia.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

16
Clocker.xcodeproj/xcuserdata/abhishekbanthia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -13,21 +13,5 @@
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Clocker/Preferences/CLPreferencesViewController.m"
timestampString = "515347475.948746"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "405"
endingLineNumber = "405"
landmarkName = "-addToFavorites:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

58
Clocker/Model/CLTimezoneDataOperations.m

@ -126,64 +126,6 @@
return menuTitle;
}
- (NSString *)compareSystemDate:(NSString *)systemDate toTimezoneDate:(NSString *)date
{
NSDateFormatter *localFormatter = [NSDateFormatter new];
localFormatter.timeStyle = NSDateFormatterMediumStyle;
localFormatter.dateStyle = NSDateFormatterMediumStyle;
localFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
NSDate *localDate = [localFormatter dateFromString:systemDate];
NSDate *timezoneDate = [localFormatter dateFromString:date];
// Specify which units we would like to use
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSInteger weekday = [calendar component:NSCalendarUnitWeekday fromDate:localDate];
NSInteger timezoneWeekday = [calendar component:NSCalendarUnitWeekday fromDate:timezoneDate];
if ([self.dataObject.nextUpdate isKindOfClass:[NSString class]])
{
NSUInteger units = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay;
NSDateComponents *comps = [[NSCalendar currentCalendar] components:units fromDate:timezoneDate];
comps.day = comps.day + 1;
NSDate *tomorrowMidnight = [[NSCalendar currentCalendar] dateFromComponents:comps];
NSDictionary *dictionary = @{CLTimezoneID : self.dataObject.timezoneID, @"latitude" : self.dataObject.latitude,
@"longitude" : self.dataObject.longitude, CLCustomLabel : self.dataObject.customLabel,
CLPlaceIdentifier : self.dataObject.place_id, CLTimezoneName : self.dataObject.formattedAddress};
CLTimezoneData *newDataObject = [[CLTimezoneData alloc] initWithDictionary:dictionary];
[newDataObject setNextUpdateForSunriseSet:tomorrowMidnight];
PanelController *panelController = [PanelController getPanelControllerInstance];
(panelController.defaultPreferences)[[panelController.defaultPreferences indexOfObject:self]] = newDataObject;
[[NSUserDefaults standardUserDefaults] setObject:panelController.defaultPreferences forKey:CLDefaultPreferenceKey];
}
NSInteger daysApart = [timezoneDate daysFrom:localDate];
if (daysApart == 0) {
return @"Today";
}
else if (daysApart == -1)
{
return @"Yesterday";
}
else if (daysApart == 1)
{
return @"Tomorrow";
}
else
{
return [self getWeekdayFromInteger:weekday+2];
}
}
- (NSString *)getDateForTimeZoneWithFutureSliderValue:(NSInteger)futureSliderValue
andDisplayType:(CLDateDisplayType)type
{

Loading…
Cancel
Save