Exemplo n.º 1
0
        DateTime IPointlessService.PointlessMethod(int value)
        {
            var minDate     = DateTime.MinValue;
            var currentDate = _dateTimeRepository.GetCurrentDateTime();

            if (currentDate.Year > 1999)
            {
                return(minDate);
            }

            var anotherDate = _dateTimeRepository.GetDateInXWorkingDaysFromCurrentDate(value);

            if (anotherDate.HasValue == false)
            {
                return(minDate);
            }

            return(anotherDate.Value.AddYears(1));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the date in X working days from the current date.
        /// </summary>
        /// <param name="workingDays">The working days (can be negative to deduct working days).</param>
        /// <returns>The date in x working days.</returns>
        DateTime?IDateTimeRepository.GetDateInXWorkingDaysFromCurrentDate(int workingDays)
        {
            IDateTimeRepository dateTimeRepository = this;

            return(dateTimeRepository.GetDateInXWorkingDays(dateTimeRepository.GetCurrentDateTime().Date, workingDays));
        }