From 168689554677c7f1480d6f1161ee371e12548e6b Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 12 Jan 2005 16:13:35 +0000 Subject: [PATCH] fix counting backwards into a leapyear --- Changes | 2 ++ perl/Julian.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 60e4b0a5..a2d22cd3 100644 --- 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 ' 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======================================================================= diff --git a/perl/Julian.pm b/perl/Julian.pm index ecef2d81..5351aa27 100644 --- a/perl/Julian.pm +++ b/perl/Julian.pm @@ -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; } -- 2.43.0