Home
Highly Reusable Software By activity User Interface Text Strings Math Processing
Stored Data
Communications
Hard World File System
|
#License - #Source code - #Example Use -
#include <librock/sdncalh.h> long librock_EasterSdn( int year, int julian);
julian
will use the Julian Calendar.)
Even though the Gregorian calendar has the most widespread use, some Orthodox churches continue to use the Julian calendar to calculate the date of Easter. (This date, Orthodox Easter, can be expressed as a Gregorian date, even though it is calculated with the Julian calendar.)
If the year is out of range, 0 is returned. The first Easter after the Gregorian calendar was created was in 1583. Easter was calculated differently before 326 A.D. Sometime after 4099 there will need to be a correction to remove an extra leap year.
The serial day number returned by this function is compatible to Scott E. Lee's sdncal routines.
This was authored by Forrest J. Cavalier III based on information and algorithms printed at http://www.assa.org.au/edm.html#OrthCalculator, and from http://www.oremus.org/liturgy/etc/ktf/app/easter.html
This was tested to match all years 1700-2299 listed at
http://www.assa.org.au/edm.html (Other tests indicate it is also accurate for years outside that range.) Typical use is #ifdef librock_TYPICAL_USE_EasterSdn #include <librock/sdncalh.h> int year = 2000; int month; int day; librock_SdnToGregorian(librock_EasterSdn(year,0),&year,&month,&day); printf("%4d %s %d\n",day,librock_MonthNameLong[month],year); #endif
librock_JulianToSdn librock_GregorianToSdn librock_DayOfWeek
Copyright 1998-2002 Forrest J. Cavalier III, http://www.mibsoftware.com Licensed under BSD-ish license, NO WARRANTY. Copies must retain this block. License text in <librock/license/librock.txt> librock_LIDESC_HC=12440211096131f5976d36be0cddca4cd9152e45
Verbatim copying and distribution of this generated page is permitted in any medium provided that no changes are made.
(The source of this manual page may be covered by a more permissive license which allows modifications.)
Want to help? We welcome comments, patches. -- Need help? Request paid support.