days-between-dates Solver equation for 17b
|
10-05-2018, 05:45 PM
(This post was last modified: 10-05-2018 11:06 PM by Albert Chan.)
Post: #2
|
|||
|
|||
RE: days-between-dates Solver equation for 17b
(10-05-2018 04:19 PM)Don Shepherd Wrote: To determine the number of days between two dates, you calculate the day number for each date and then subtract. Why not just eval day number for the two dates, then subtract ? (Not as subroutine, but run the program twice) Edit: another benefit of exposing day number is you get days-of-the-week for free. Example, picking day number 1 for a Monday (say, Jan 1, 1, year 1) we get this: Today 10/05/2018 => days = 736972, days % 7 = 5 => Friday |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)