fix counting backwards into a leapyear
authorminima <minima>
Wed, 12 Jan 2005 16:13:35 +0000 (16:13 +0000)
committerminima <minima>
Wed, 12 Jan 2005 16:13:35 +0000 (16:13 +0000)
Changes
perl/Julian.pm

diff --git a/Changes b/Changes
index 60e4b0a5c3f063035114e6619a8a5ce2791cff80..a2d22cd3558e0a356b657591659017ef1a018bf8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -13,6 +13,8 @@ is for sysops who don't want to bump privilege to allow it. That still works
 as before.
 5. Fix the bug in 'dx by <call>' that causes only the first word of the 
 comment to be recorded.
+6. Fix bug counting backwards over a leap year in Julian.pm which meant that
+sh/dxstats doesn't start at 'yesterday' anymore.
 27Dec04=======================================================================
 1. add improved VE data from Charlie K1XX. You should update usdb as well.
 22Dec04=======================================================================
index ecef2d81e0f3bb5809ced2ebe4989114bc9c6eb3..5351aa278c98bec968dabe03e20339284c8321f8 100644 (file)
@@ -79,9 +79,9 @@ sub sub($$)
        my $diny = _isleap($self->[0]) ? 366 : 365;
        $self->[1] -= $amount;
        while ($self->[1] <= 0) {
-               $self->[1] += $diny;
                $self->[0] -= 1;
                $diny = _isleap($self->[0]) ? 366 : 365;
+               $self->[1] += $diny;
        }
        return $self;
 }