From 429d1fb2a8a03b72a4e6d1ab7b48ece2bbd50f4b Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 20 Aug 2018 14:01:37 -0400 Subject: [PATCH] (Preferences) Always show a date before the 10th So that %d and %e return two different strings. --- UI/PreferencesUI/UIxPreferences.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 0070a47c7..8937f76df 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -98,6 +98,7 @@ static NSArray *reminderValues = nil; - (id) init { + NSCalendarDate *referenceDate; SOGoDomainDefaults *dd; if ((self = [super init])) @@ -107,7 +108,10 @@ static NSArray *reminderValues = nil; client = nil; #warning user should be the owner rather than the activeUser ASSIGN (user, [context activeUser]); - ASSIGN (today, [NSCalendarDate date]); + referenceDate = [NSCalendarDate date]; + if ([referenceDate dayOfMonth] > 9) + referenceDate = [referenceDate addYear:0 month:0 day:(-[referenceDate dayOfMonth] + 1) hour:0 minute:0 second:0]; + ASSIGN (today, referenceDate); calendarCategories = nil; calendarCategoriesColors = nil;