svn commit: r219569 - in stable/8/usr.bin/calendar: .
calendars/ru_RU.KOI8-R
Sergey A. Osokin
osa at FreeBSD.org
Sat Mar 12 14:57:11 UTC 2011
Author: osa (ports committer)
Date: Sat Mar 12 14:57:10 2011
New Revision: 219569
URL: http://svn.freebsd.org/changeset/base/219569
Log:
MFC r216697:
Fix typo (Pashka -> Paskha).
MFC r217025:
Fix typo: March -> September.
MFC r218471:
Fix Paskha and Paskha-specific holidays.
MFC r218473:
Always convert Paskha day from Julian (old) to Gregorian (new)
style by adding 13 days. Bug introduced in 1.13 revision.
MFC r218771:
Fix the beginning day of the Great Lent, it starts on Monday
for 7 weeks before Paskha.
Fix the Exaltation of the Holy Cross day.
Add more Twelve holidays (dvunadesyatye prazdniki).
MFC r218797:
Replace hard-coded value by Julian2Gregorian converter function.
MFC r219174:
Fix beginning day of the Carnival.
MFC r219175:
Expand the name of Palm Sunday holiday with more canonical Entry
of the Lord into Jerusalem.
Merge the Pentecost and Trinity Sunday holidays, they are synonyms.
Remove Body of Christ day, nonexistent holiday for Orthodox Church.
Fix typo in the name of Ioann The Baptist, introduced in previous
commit.
Modified:
stable/8/usr.bin/calendar/calendar.1
stable/8/usr.bin/calendar/calendar.h
stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox (contents, props changed)
stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan (contents, props changed)
stable/8/usr.bin/calendar/parsedata.c
stable/8/usr.bin/calendar/paskha.c
Directory Properties:
stable/8/usr.bin/calendar/ (props changed)
Modified: stable/8/usr.bin/calendar/calendar.1
==============================================================================
--- stable/8/usr.bin/calendar/calendar.1 Sat Mar 12 14:47:54 2011 (r219568)
+++ stable/8/usr.bin/calendar/calendar.1 Sat Mar 12 14:57:10 2011 (r219569)
@@ -128,7 +128,7 @@ The solar equinox in March.
.It JunSolstice
The solar solstice in June.
.It SepEquinox
-The solar equinox in March.
+The solar equinox in September.
.It DecSolstice
The solar solstice in December.
.It ChineseNewYear
@@ -155,7 +155,7 @@ The names of the recognized special days
positive or negative integer, like:
.Dq Easter+3
or
-.Dq Pashka-4 .
+.Dq Paskha-4 .
.Pp
Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for
last, first, second, third, fourth) for moving events like
Modified: stable/8/usr.bin/calendar/calendar.h
==============================================================================
--- stable/8/usr.bin/calendar/calendar.h Sat Mar 12 14:47:54 2011 (r219568)
+++ stable/8/usr.bin/calendar/calendar.h Sat Mar 12 14:57:10 2011 (r219569)
@@ -167,9 +167,10 @@ void cal(void);
void closecal(FILE *);
FILE *opencal(void);
-/* ostern.c / pashka.c */
+/* ostern.c / paskha.c */
int paskha(int);
int easter(int);
+int j2g(int);
/* dates.c */
extern int cumdaytab[][14];
Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox
==============================================================================
--- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox Sat Mar 12 14:47:54 2011 (r219568)
+++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.orthodox Sat Mar 12 14:57:10 2011 (r219569)
@@ -11,24 +11,26 @@ LANG=ru_RU.KOI8-R
Paskha=ðÁÓÈÁ
21 ÓÅÎ òÏÖÄÅÓÔ×Ï ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
-28 ÓÅÎ ÷ÏÚÄ×ÉÖÅÎÉÅ ëÒÅÓÔÁ çÏÓÐÏÄÎÑ
+27 ÓÅÎ ÷ÏÚÄ×ÉÖÅÎÉÅ ëÒÅÓÔÁ çÏÓÐÏÄÎÑ
14 ÏËÔ ðÏËÒÏ× ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
4 ÄÅË ÷×ÅÄÅÎÉÅ ×Ï ÈÒÁÍ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
7 ÑÎ× òÏÖÄÅÓÔ×Ï èÒÉÓÔÏ×Ï
+14 ÑÎ× ïÂÒÅÚÁÎÉÅ çÏÓÐÏÄÎÅ
19 ÑÎ× âÏÇÏÑ×ÌÅÎÉÅ ÉÌÉ ëÒÅÝÅÎÉÅ çÏÓÐÏÄÎÅ
15 ÆÅ× óÒÅÔÅÎÉÅ çÏÓÐÏÄÎÅ
-ðÁÓÈÁ-46 ÷ÅÌÉËÉÊ ðÏÓÔ
-ðÁÓÈÁ-7 ÷ÅÒÂÎÏÅ ÷ÏÓËÒÅÓÅÎØÅ
+ðÁÓÈÁ-48 ÷ÅÌÉËÉÊ ðÏÓÔ
+ðÁÓÈÁ-7 ÷ÈÏÄ çÏÓÐÏÄÅÎØ × éÅÒÕÓÁÌÉÍ. ÷ÅÒÂÎÏÅ ÷ÏÓËÒÅÓÅÎØÅ
ðÁÓÈÁ-3 ÷ÅÌÉËÉÊ þÅÔ×ÅÒÇ
ðÁÓÈÁ-2 óÔÒÁÓÔÎÁÑ ðÑÔÎÉÃÁ
ðÁÓÈÁ ÷ÏÓËÒÅÓÅÎÉÅ èÒÉÓÔÏ×Ï
ðÁÓÈÁ+39 ÷ÏÚÎÅÓÅÎÉÅ
-ðÁÓÈÁ+49 ðÑÔÉÄÅÓÑÔÎÉÃÁ
-ðÁÓÈÁ+56 ôÒÏÉÃÉÎ äÅÎØ
-ðÁÓÈÁ+60 ðÒÁÚÄÎÉË ôÅÌÁ èÒÉÓÔÏ×Á
+ðÁÓÈÁ+49 äÅÎØ ó×ÑÔÏÊ ôÒÏÉÃÙ. ðÑÔÉÄÅÓÑÔÎÉÃÁ
7 ÁÐÒ âÌÁÇÏ×ÅÝÅÎÉÅ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
+ 7 ÉÀÌ òÏÖÄÅÓÔ×Ï éÏÁÎÎÁ ðÒÅÄÔÅÞÉ
+12 ÉÀÌ äÅÎØ Ó×ÑÔÙÈ ÐÅÒ×Ï×ÅÒÈÏ×ÎÙÈ ÁÐÏÓÔÏÌÏ× ðÅÔÒÁ É ðÁ×ÌÁ
19 Á×Ç ðÒÅÏÂÒÁÖÅÎÉÅ çÏÓÐÏÄÎÅ
28 Á×Ç õÓÐÅÎÉÅ ðÒÅÓ×ÑÔÏÊ âÏÇÏÒÏÄÉÃÙ
+11 ÓÅÎ õÓÅËÎÏ×ÅÎÉÅ ÇÌÁ×Ù éÏÁÎÎÁ ðÒÅÄÔÅÞÉ
#endif /* !_ru_RU_KOI8_R_orthodox_ */
Modified: stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan
==============================================================================
--- stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan Sat Mar 12 14:47:54 2011 (r219568)
+++ stable/8/usr.bin/calendar/calendars/ru_RU.KOI8-R/calendar.pagan Sat Mar 12 14:57:10 2011 (r219569)
@@ -17,7 +17,7 @@ Paskha=ðÁÓÈÁ
29 ÆÅ× äÅÎØ ëÁÝÅÑ
1 ÍÁÒ äÅÎØ íÁÒÅÎÙ
14 ÍÁÒ îÏ×ÙÊ çÏÄ, ï×ÓÅÎØ ÍÁÌÙÊ
-ðÁÓÈÁ-47 íÁÓÌÅÎÉÃÁ
+ðÁÓÈÁ-55 íÁÓÌÅÎÉÃÁ
ðÁÓÈÁ+7 ëÒÁÓÎÁÑ çÏÒËÁ
ðÁÓÈÁ+16 òÁÄÕÎÉÃÁ
20 ÍÁÒ* ÷ÅÓÅÎÎÉÅ ÒÁ×ÎÏÄÅÎÓÔ×ÉÅ
Modified: stable/8/usr.bin/calendar/parsedata.c
==============================================================================
--- stable/8/usr.bin/calendar/parsedata.c Sat Mar 12 14:47:54 2011 (r219568)
+++ stable/8/usr.bin/calendar/parsedata.c Sat Mar 12 14:57:10 2011 (r219569)
@@ -80,7 +80,7 @@ static char *floattotime(double f);
* ModifierIndex ::= 'Second' | 'Third' | 'Fourth' | 'Fifth' |
* 'First' | 'Last'
*
- * SpecialDay ::= 'Easter' | 'Pashka' | 'ChineseNewYear'
+ * SpecialDay ::= 'Easter' | 'Paskha' | 'ChineseNewYear'
*
*/
static int
@@ -459,6 +459,7 @@ parsedaymonth(char *date, int *yearp, in
yearinfo->mondays = mondaytab[isleap(year)];
yearinfo->ieaster = easter(year);
+ yearinfo->ipaskha = paskha(year);
fpom(year, UTCOffset, yearinfo->ffullmoon,
yearinfo->fnewmoon);
fpom(year, UTCOFFSET_CNY, yearinfo->ffullmooncny,
Modified: stable/8/usr.bin/calendar/paskha.c
==============================================================================
--- stable/8/usr.bin/calendar/paskha.c Sat Mar 12 14:47:54 2011 (r219568)
+++ stable/8/usr.bin/calendar/paskha.c Sat Mar 12 14:57:10 2011 (r219569)
@@ -36,8 +36,17 @@ __FBSDID("$FreeBSD$");
#define PASKHA "paskha"
#define PASKHALEN (sizeof(PASKHA) - 1)
+/* return difference in days between Julian and Gregorian calendars */
+int
+j2g(int year)
+{
+ return (year < 1500) ?
+ 0 :
+ 10 + (year/100 - 16) - ((year/100 - 16) / 4);
+}
+
/* return year day for Orthodox Easter using Gauss formula */
-/* (old style result) */
+/* (new style result) */
int
paskha(int R) /*year*/
@@ -53,5 +62,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) + j2g(R));
}
More information about the svn-src-stable
mailing list