How to calculate the number of days between two given dates? (Leap year obstacle)

后端 未结 6 1054
情深已故
情深已故 2020-12-11 20:44
  • Any year evenly divisible by 400 is a leap year (e.g., 2000 was a leap year).
  • Any other year evenly divisible by 100 is not a leap year (e.g., 1700, 1800 and
6条回答
  •  暖寄归人
    2020-12-11 21:31

    I would convert the two dates in Julian day and then do the difference, but I would have to check if this is a good solution with no drawbacks first. I suggest you to do the same.

提交回复
热议问题