Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Feb 2011 06:38:32 +0000 (UTC)
From:      "Sergey A. Osokin" <osa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r218473 - head/usr.bin/calendar
Message-ID:  <201102090638.p196cWST073607@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: osa (ports committer)
Date: Wed Feb  9 06:38:32 2011
New Revision: 218473
URL: http://svn.freebsd.org/changeset/base/218473

Log:
  Always convert Paskha day from Julian (old) to Gregorian (new) style by
  adding 13 days.  Bug introduced in 1.13 revision.

Modified:
  head/usr.bin/calendar/paskha.c

Modified: head/usr.bin/calendar/paskha.c
==============================================================================
--- head/usr.bin/calendar/paskha.c	Wed Feb  9 05:48:52 2011	(r218472)
+++ head/usr.bin/calendar/paskha.c	Wed Feb  9 06:38:32 2011	(r218473)
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
 #define	PASKHALEN	(sizeof(PASKHA) - 1)
 
 /* return year day for Orthodox Easter using Gauss formula */
-/* (old style result) */
+/* (new style result) */
 
 int
 paskha(int R) /*year*/
@@ -53,5 +53,5 @@ paskha(int R) /*year*/
 	d = (19 * a + x) % 30;
 	e = (2 * b + 4 * c + 6 * d + y) % 7;
 	cumday = cumdaytab[isleap(R)];
-	return (((cumday[3] + 1) + 22) + (d + e));
+	return (((cumday[3] + 1) + 22) + (d + e) + 13);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102090638.p196cWST073607>