Open s-v-z opened 7 years ago
The title is quite self-explanatory. busines_time_until returns inconsistent results when called on Time/DateTime objects and holidays are within the range.
Below is an example of such an inconsistency.
2.1.5 :017 > BusinessTime::Config.holidays.clear => #<SortedSet: {}> 2.1.5 :018 > BusinessTime::Config.holidays << Date.new(2017,10,18) => #<SortedSet: {Wed, 18 Oct 2017}> 2.1.5 :019 > start = Time.new(2017,10,16) => 2017-10-16 00:00:00 +0300 2.1.5 :020 > fin = Time.new(2017,10,20) => 2017-10-20 00:00:00 +0300 2.1.5 :021 > start.business_time_until(fin) / 3600 => 27.0 2.1.5 :022 > (start.to_datetime.business_time_until(fin.to_datetime)).to_f / 3600 => 18.000104166666667
Will investigate.
The title is quite self-explanatory. busines_time_until returns inconsistent results when called on Time/DateTime objects and holidays are within the range.
Below is an example of such an inconsistency.