Closed sagikazarmark closed 9 years ago
For information the closest()
is optimized, it performs a translation to the next opening date instead of iterating on all dates and seeing if it's opened.
So subsequent calls are safe from a performance point of view?
Yes, I don't see a better algorithm than the current one. The only other way is to iterate all dates but it will be slower
Well, what I wanted to confirm is that it is safe to subsequently call closest
and there is no "better" way of doing this internally.
No :) I close this issue then
Currently it is possible to calculate nth business day with subsequent calls to the
closest
method. I wonder if there is a better way internally.Use case: depending on order date and shipping carrier, shipping date can vary. For example carrier one ships within two business days and so on.