Defect #29855

Updated by Go MAEDA about 2 years ago

@Redmine::Util::DateCalculation#add_working_days(date, n)@ returns wrong date when @date@ is holiday and @n@ is a multiple of 5.

Example:

<pre>
irb(main):004:0> Setting.non_working_week_days
=> ["6", "7"]
irb(main):001:0> include Redmine::Utils::DateCalculation
irb(main):002:0> add_working_days(Date.new(2018, 10, 27), 5)
=> Mon, 05 Nov 2018 # Expected Fri, 02 26 Nov 2018
irb(main):003:0> add_working_days(Date.new(2018, 10, 28), 5)
=> Mon, 05 Nov 2018 # Expected Fri, 02 26 Nov 2018
</pre>

Tested with @trunk@17598@

Back