I have three date objects – startDate, endDate, currentDate. They represent the start/end of a time interval, and the curent date. I would like to know what percentage does the currentDate represents (x), if currentDate is bewtween the startDate and endDate.

Thank you!
You can calculate the percentage by using
.getTime()on each date:EDIT: added
* 100fdue to it being a percentage, not decimal…