Think of Sunday as zero, and Saturday as six.
That means Thursday is 4. Add 10 days, and you're at 14. What index do you want? What if you had added 15 days? 16? Are you starting to see a pattern?
Type: Posts; User: KevinWorkman
Think of Sunday as zero, and Saturday as six.
That means Thursday is 4. Add 10 days, and you're at 14. What index do you want? What if you had added 15 days? 16? Are you starting to see a pattern?
So is that working now? If not, what happens? What did you expect to happen?
You seem to be figuring out how to advance the hours based on the minutes, so can't you do the same thing, advance the days based on the hours?