Efficient algorithm for converting number of days to years (including leap years)

后端 未结 10 1992
逝去的感伤
逝去的感伤 2021-02-05 17:04

The problem

I am writing a class for holding dates in c++, and I found the following problem:

I have a number of days N since a reference date (in

10条回答
  •  心在旅途
    2021-02-05 17:22

    To use the punchline of an old joke, "I wouldn't start from here".

    You'll want to read up about various changes to calendaring before "modern" times, for example, what happened in 1752

提交回复
热议问题