Casio FC-200 Financial Consultant
|
12-27-2020, 04:22 PM
Post: #16
|
|||
|
|||
RE: Casio FC-200 Financial Consultant
Here is an implementation without sign(), and very fast.
Code: function networkdays(A, B) -- assumed date A <= B Sunday to Saturday is the tricky one, where my previous attempts failed. FYI, Dave's posted code might failed this too. Please confirm. lua> networkdays(day(2021,2,28), day(2021,3,5)) -- Sun to Fri 5 lua> networkdays(day(2021,2,28), day(2021,3,6)) -- Sun to Sat 5 lua> networkdays(day(2021,2,28), day(2021,3,7)) -- Sun to Sun 5 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)