Talk:Holidays related to Easter: Difference between revisions

m
(move comments around to more appropriate places.)
 
(14 intermediate revisions by 5 users not shown)
Line 1:
==Whose Easter?==
Whose Easter are we calculating here? Or, more specifically, which calendars are we using? (And, when do we switch from Gregorian to Julian?) According to Wikipedia, depending on the answers to these questions we can have easter in March, April or May. The sample output from the Algol 68 program makes me think that we are supposed to calculate what wikipedia calls the "Western Christianity"'s Easter, but that was just one of the issues which cause different people to assign different dates to easter in the same year. I think a full specification would be appropriate here. (Easter is apparently the first sunday after the 14th of the month where it occurs, but I am confused about how you unambiguously determine which month it occurs in. But I am also having problems reconciling this "first sunday after the 14th of the month" rule with easters which occur in the first week of April.) --[[User:Rdm|Rdm]] 14:40, 29 June 2010 (UTC)
 
Line 11 ⟶ 12:
::: [OT: Time.... to be the [[wp:Time Lord|Time Lord]] and just play with time... I heard [an urban myth(?)] that [[wp:Julius Caesar|Julius Caesar]] changed the first month of the year from March to the next January so as to increase his term in the Senate. Hence to this day Sep/Oct/Nov/December are no longer the 7th/8th/9th/10th months. It seems when you are the [[wp:Roman consul|Consul]]/[[wp:Roman dictator|Dictator]] of the [[wp:Roman Republic|Roman Republic]] you then have enough authority to bend time! EYHO Albert! :-) ]
::: [[User:NevilleDNZ|NevilleDNZ]] 00:33, 1 July 2010 (UTC)
 
:::: You're right about that being an urban myth, FYI. The numbering of the months dates from an older Roman calendar, older even than the one Julius replaced. The short-changing of February is just as old; the story of Julius and Augustus stealing days from it to make their months 31 days each is also a myth. --[[User:Markjreed|Markjreed]] 04:37, 4 June 2011 (UTC)
 
:::: For example: http://www.merlyn.demon.co.uk/estrdate.htm#MEDC -- for the year 2011, easter falls on April 11 and April 24 where in the year 2000, it fell on April 17th, April 23 and April 30. And things are much simpler now than they were in the past... --[[User:Rdm|Rdm]] 02:20, 5 July 2010 (UTC)
::: Well, all that I can really say for sure is that the code is probably wrong, but both the Algol and Tcl examples are wrong in the same way. (I know they're wrong because when I put in the day of the week, things are all over the place before the switch to the Gregorian calendar; that's an area where I'm pretty sure that the Tcl time formatting engine is correct; the guy who wrote the modern implementation is a ''serious'' time geek.) Given the massive uncertainty over calendars, I suggest not worrying about it. As noted, it's been a point of contention for the church for a long time even without programmers involved. –[[User:Dkf|Donal Fellows]] 09:33, 5 July 2010 (UTC)
<br>
:: Not only is it horribly complicated (or rather not clear), arguments over how to do it split the church (the excommunication of the Quartodecimans which sounds like something out of Ghostbusters) and almost started conflicts. See [http://mangsbatpage.433rd.com/2008/03/calculating-easter.html] --[[User:Dgamey|Dgamey]] 22:27, 8 July 2010 (UTC)
<br>I was thinking of adding a Python calculator for future easters that relied on the random module :-)<br>--[[User:Paddy3118|Paddy3118]] 13:07, 5 July 2010 (UTC)
 
::: To be fair, Easter calculation is a bit complex, but not "horribly" so, nor is it all that controversial at this point. Most of the complexity in descriptions is left over from the traditional, pre-computer methods used to calculate the date; in straightforward code, it's not that bad. As for the controversy, that was mostly settled in 325 AD. There is one remaining schism - between the Western and Eastern Orthodox congregations - and even they agree on the basic rule: Easter is the first Sunday after the first (approximated) full moon on or after March 21st. They only disagree in the choice of calendar, which leads to two discrepancies: the two calendars call different days "March 21st" (for years between 1900 and 21002099, Eastern "March 21st" is the same day as Western "April 3rd"), and have slightly different rules for approximating the moon phases, so the calculated "full moon" falls on different dates between them. In 2012, Western churches will observe Easter Sunday on April 8th, but the Julian calculation places it on April 2nd, and because of the 13-day difference between the calendars, the actual date of Orthodox Easter is April 15th. --[[User:Markjreed|Markjreed]] 04:22, 4 June 2011 (UTC)
 
<br>I was thinking of adding a Python calculator for future easters that relied on the random module :-)<br>--[[User:Paddy3118|Paddy3118]] 13:07, 5 July 2010 (UTC)
 
==Suggestion==
Line 25 ⟶ 30:
 
To take away the uncertainty, you only have to specify which set of rules. As I said above, different churches use different rules (Gregorian vs Julian), so you have to specify at least which of those you want. But having specified Gregorian, there's no need to limit it to such a narrow range of years; the Gregorian rules are valid in the Western Church as far back as the Gregorian calendar has been in use, which is of course locale-dependent, but goes back at least as far as 1929 everywhere (see [[wp:Gregorian Calendar#Adoption]]), and those rules are valid for the foreseeable future as well (though there have been proposals to abandon them in favor of a wholly astronomical calculation.) --[[User:Markjreed|Markjreed]] 03:58, 4 June 2011 (UTC)
 
== Inconsistency for negative years ==
 
There is an inconsistency in the results of the solutions on this page for negative years. (Yes, I know that Easter didn't exist back then, but this is just from an algorithmic perspective.) For example, for the year -1 (i.e. 2 B.C.), the C code produces an Easter date of March 27, while the Ruby code produces April 18. I believe this is due to the different behavior of the modulo operator for negative numbers. --[[User:Spoon!|Spoon!]] 23:43, 18 December 2011 (UTC)
 
For 2 BCE, Julian (Orthodox) Easter rules should apply, and Easter should be April 20 (Julian). But you apply Gregorian rules and use the Gregorian calendar, then April 18 is correct. (In fact, both sets of rules produce the same result in this instance, since those dates refer to the same Sunday). So the C code is incorrect in this instance. --[[User:Markjreed|Markjreed]] ([[User talk:Markjreed|talk]]) 03:01, 16 January 2021 (UTC)
 
== Description ==
''"Eastern Orthodox Church eventually adopted the Gregorian calendar for the fixed holidays and no longer observes Christmas on its Julian date"'' - what? Christmas is celebrated on January 7th according to the Gregorian calendar, not December 25th. [[User:Русский|Русский]] ([[User talk:Русский|talk]]) 20:42, 6 March 2021 (UTC)
 
Also, there is some ambiguity in the page about which Easter calculus should be used and which calendar to display dates on the screen. If the computus depends on the church and there are only two of them, then the date on the screen, in my opinion, should be done using the civil (secular) calendar.
 
For example, Russian Easter is accurately calculated by the year number with just two expressions: d = (y % 19 * 19 + 15) % 30; d + = (y % 4 * 2 + y % 7 * 4 + 6 * d + 6) % 7. This rule was established by the Church Fathers and has not changed since 325 (for Russians, this is more important than for Catholics , because it is Easter that is the main holiday in Orthodox Christianity). Further, if the year is less than 1918 then we add the resulting number to March 22 and get the date according to the Julian calendar. Otherwise, we calculate the correction for the Gregorian calendar and display the date in the new style. Everything is simple and clear here.
 
For western churches, the situation is different: the Roman Church introduced a new algorithm in 1582, but countries adopted the new calendar gradually, until the mid-20th century. Therefore, it is difficult to determine in which calendar for which year to display the date. That is, the year 1582 has neither astronomical nor political significance, it is just the time of the proposal for a new calendar. I guess it should be parameterizable values. But most of the algorithms do not even take this into account, calculating the date of Easter in 400 according to the Catholics algorithm and displaying the date according to the Gregorian calendar, which, in my opinion, is absurd (remember that from the point of view of Christianity, all regulations and innovations of Catholics are heresy). [[User:Русский|Русский]] ([[User talk:Русский|talk]]) 10:21, 8 March 2021 (UTC)
 
: Apologies for the misinformation about Christmas (I think that was me; I was in any case under that same mistaken belief). But let's not refer to anyone's faith as "heresy" here, please. This is a programming site, not a place to get into a literal religious debate. I have edited the desciption text to be hopefully both more accurate and more balanced. --[[User:Markjreed|Markjreed]] ([[User talk:Markjreed|talk]]) 15:48, 8 March 2021 (UTC)
 
:: Ok, it looks good. I would like to draw your attention to the problem again. The description correctly says: "In the year 400 CE, Easter Sunday was April 1st", this is the date according to the calendar valid in the 400th year. However, in most solutions, the date is April 2, that is, Monday. I suppose that the solution to this task should be the following (I wrote the code in JS, but I think everyone understands it):
:: <lang javascript>function getEasterDate(year = new Date().getFullYear(), church = 1, calendar = year < 1918 ? 1 : 2) {
/* year: a number of the year (from 325 CE);
church: an algorithm of the computus,
for Orthodox = 1; for Catholic = 2;
calendar: a calendar of the output date,
Julian = 1; Gregorian = 2. */
 
if (church == 1) {
let d = (year % 19 * 19 + 15) % 30;
d += (year % 4 * 2 + year % 7 * 4 + 6 * d + 6) % 7;
if (calendar == 1)
return d > 9 ? [d - 9, 4] : [22 + d, 3];
else if (calendar == 2) {
const c = (year / 100 | 0) - (year / 400 | 0) - 2;
return d > 39 - c ? [d - 39 + c, 5] : [d - 9 + c, 4];
}
}
 
else if (church == 2) {
const
a = year % 19, b = year / 100 | 0, c = year % 100,
d = (19 * a + b - (b / 4 | 0) - ((b - ((b + 8) / 25 | 0) + 1) / 3 | 0) + 15) % 30,
e = (32 + 2 * (b % 4) + 2 * (c / 4 | 0) - d - c % 4) % 7,
f = d + e - 7 * ((a + 11 * d + 22 * e) / 451 | 0) + 114;
if (calendar == 1) {
const
g = f % 31 + 1,
h = (year / 100 | 0) - (year / 400 | 0) - 2;
return g <= h ? [31 + g - h, 3] : [g - h, f / 31 | 0];
}
else if (calendar == 2)
return [f % 31 + 1, f / 31 | 0];
}
}
 
const
OrthodoxHolidays = [["Easter", 1], ["Ascension", 40], ["Trinity (Pentecost)", 50], ["All Saints' Sunday", 57]],
CatholicHolidays = [["Easter", 1], ["Ascension", 40], ["Pentecost", 50], ["Trinity Sunday", 57], ["Corpus Christi", 61]];
 
const firstYearOfNewStyle = 1918;
 
function getHolidaysDates(year, church) {
const
Easter = getEasterDate(year, church, year < firstYearOfNewStyle ? 1 : 2),
holidays = church == 1 ? OrthodoxHolidays : CatholicHolidays;
return year + ": " +
holidays.map(h => {
const d = new Date(year, Easter[1] - 1, Easter[0]);
d.setDate(d.getDate() + h[1] - 1);
return h[0] + ": " + new Intl.DateTimeFormat("ru", { month: "numeric", day: "numeric" }).format(d);
}).join("; ") + ".";
}
 
document.write(getHolidaysDates(400, 1));</lang>