Post Reply 
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.
In a programming language that supports subroutines, it would be easy to calculate the number of days difference.
The 17b solver, however, does not support subroutines.

I figured out a way to use the sigma function to make up for this deficiency ...

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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: days-between-dates Solver equation for 17b - Albert Chan - 10-05-2018 05:45 PM



User(s) browsing this thread: 1 Guest(s)