Example #1
0
        private string GetTasksFilter(DateTime dueDateTime, bool includeOverdues)
        {
            if (includeOverdues)
            {
                return(string.Format(DueTodayOrBeforeFilter,
                                     _datetimeUtils.FormatLongUtc(_datetimeUtils.GetEndOfDay(dueDateTime))));
            }

            return(string.Format(DueTodayFilter,
                                 _datetimeUtils.FormatLongUtc(_datetimeUtils.GetStartOfDay(dueDateTime)),
                                 _datetimeUtils.FormatLongUtc(_datetimeUtils.GetEndOfDay(dueDateTime))));
        }
Example #2
0
        private string GetEventsFilter(DateTime dueDatetime, bool includeCancelledEvents)
        {
            var eventsFilter = string.Format(DueTodayFilter,
                                             _datetimeUtils.FormatLongUtc(_datetimeUtils.GetStartOfDay(dueDatetime)),
                                             _datetimeUtils.FormatLongUtc(_datetimeUtils.GetEndOfDay(dueDatetime)));

            if (includeCancelledEvents == false)
            {
                eventsFilter = $"{eventsFilter}&{IsCancelledFilter}";
            }

            return(eventsFilter);
        }