This calculates the number of hours to the next day at noon, and then adds 24*day for the next 3 days. I'm not exactly sure where the original code is going wrong, but we can avoid doing math on Date objects completely since we only care about the number of hours until the next day at noon.
This calculates the number of hours to the next day at noon, and then adds 24*day for the next 3 days. I'm not exactly sure where the original code is going wrong, but we can avoid doing math on Date objects completely since we only care about the number of hours until the next day at noon.