-
Posts
4,248 -
Joined
-
Last visited
Single Status Update
-
On Koperincus' GetDate(), at
// Current Year
int num1 = (int)(time / Y.value);
// Current Day int num5 = (int)(time / D.value) - (int)(Math.Round(Y.value / D.value, 0, MidpointRounding.AwayFromZero) * num1);
based on the comment just above that code, I would have thought
int num5 = (int)(time / D.value) - (int) Math.Round(num1 * Y.value / D.value, 0, MidpointRounding.AwayFromZero);
so that you assume all the years before the current year have had enough leap days to sum to the number of days closest to the last change of astronomical year; then the first day after each astronomical year-change is day 1
If D = 1000 and Y= 10'400 to have 10.4 solar days in a solar year, then
time = 105'000 => num1 = 10years, num5 = 105 - 104 = 1days
( instead of the current code's num1 = 10years, num5 = 105 - 10 × 10 = 5days )
-
@OHara you are probably right
I'll try to bug test this tonight
-
actually, it wouldn't be
num5 = 105 - 10 × 10 = 5days
it would be
num5 = 105 - 10 × 11 = -5days
so clearly there's something wrong
I still need to test this more, as of now the results for time 1 would be Year 0 and Day 0
but it should be Year 1 and Day 1 instead
I'm not sure if the +1 gets added later or what (probably yes)
-