Jump to content

Sigma88

Members
  • Posts

    4,248
  • Joined

  • Last visited

Reputation

2,236 Excellent

Contact Methods

Profile Information

  • About me
    Galactic Neighbor
  • Location
    404 Sigma Not Found

Recent Profile Visitors

25,376 profile views

Single Status Update

See all updates by Sigma88

  1. 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 )

    1. Sigma88

      Sigma88

      @OHara you are probably right

      I'll try to bug test this tonight :)

    2. Sigma88

      Sigma88

      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)

×
×
  • Create New...