From f3cf29ea1fa0d12c8b7fa28cc35f90f8adfcea22 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 29 Aug 2017 11:06:36 -0400 Subject: [PATCH] (fix) correctly handle "Day of the month" constraint --- UI/Scheduler/UIxComponentEditor.m | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 2bea31ca7..080e4759d 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -2028,9 +2028,17 @@ RANGE(2); occurence = [[self repeat3] intValue] + 1; if (occurence > 5) // the first/second/third/fourth/fifth .. occurence = -1; // the last .. - [theRule setSingleValue: [NSString stringWithFormat: @"%d%@", - occurence, day] - forKey: @"byday"]; + + // Day of the month (last, fourth, etc.) + if ([[self repeat4] intValue] == 7) + { + [theRule setSingleValue: [NSString stringWithFormat: @"%d",occurence] + forKey: @"bymonthday"]; + } + else + [theRule setSingleValue: [NSString stringWithFormat: @"%d%@", + occurence, day] + forKey: @"byday"]; } else {