Schweiger: I was just going to post a response to CajunCenturion post, when I saw that you posted again.
Don't worry about it
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
.
There are 3 possible answers now and we are just searching for the best.
I think in this case accuracy is best, because the speed of both functions are sufficient, even if one is faster than the other.
I will post below my response to CajunCenturion. Maybe you can open my eyes on where the problem is and how to correct it and what the correct amount (not per MS - they could be wrong also) should be.
All the best!
-------------------------------------------------------
CajunCenturion:
Thank you for your paticipation and help.
That day error(every few centeries a leap year is missing) is what I was thinking.
The question is: Is that correct? ANd, which count, and leap year count is correct? And, what are the other factors involved?
I myself used the wrong factor(mean days in year).
I checked the books and found that the calendar is based on
Mean Tropical Solar Years, which equals: 365.2422 days. But even with this factor it still hangs on the year 1508/1509.
Using the factor that you came up with(365.2425) produces the same results.
I calculated my self the number of leap years in 1508 years, and multiplied that by 366, then added that to the number of remaining years * 365 and come up with a factor of: 365.238952389 days/year, with the last 5 digits continuing the same (unrounded), and with 377 leap years.
Now, I haven't as of yet needed to write any programs for Historians, Astonomers or Archaeologists, mainly business programs, so I really haven't needed this type of accuracy in the past. But, someone here may. Therefore, because of that reason, and my own desire for an accurate method, I would like to investigate this further.
Can anyone shead more light on the subject.
1. How many days are there really in say, a 1508 year time span?
2. Why does this code in a loop through the years report back 365 leap years and not 377 leap years in a 1508 year time span?
If IsDate("29.02." & Year(date1)) Then
lCount = lCount + 1
End If
[/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!