{"id":32862,"date":"2022-01-17T21:01:48","date_gmt":"2022-01-17T21:01:48","guid":{"rendered":"https:\/\/www.roger-pearse.com\/weblog\/?p=32862"},"modified":"2022-01-17T21:01:48","modified_gmt":"2022-01-17T21:01:48","slug":"a-brief-yet-very-nice-description-of-the-calculation-of-the-date-of-easter-from-a-php-manual","status":"publish","type":"post","link":"https:\/\/roger-pearse.com\/weblog\/2022\/01\/17\/a-brief-yet-very-nice-description-of-the-calculation-of-the-date-of-easter-from-a-php-manual\/","title":{"rendered":"A brief yet very nice description of the calculation of the date of Easter from &#8230; a PHP manual!"},"content":{"rendered":"<p align=\"justify\">Computer programs need to calculate the date of Easter sometimes.\u00a0 In the PHP programming language, there is a function, <strong>easter_date<\/strong>, which is used for the purpose.\u00a0 The manual page is <a href=\"https:\/\/www.php.net\/manual\/en\/function.easter-date.php\">here<\/a>, and is really rather good!<\/p>\n<blockquote>\n<p align=\"justify\">The date of Easter Day was defined by the Council of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. The Equinox is assumed to always fall on 21st March, so the calculation reduces to determining the date of the full moon and the date of the following Sunday. The algorithm used here was introduced around the year 532 by Dionysius Exiguus. Under the Julian Calendar (for years before 1753) a simple 19-year cycle is used to track the phases of the Moon. Under the Gregorian Calendar (for years after 1753 &#8211; devised by Clavius and Lilius, and introduced by Pope Gregory XIII in October 1582, and into Britain and its then colonies in September 1752) two correction factors are added to make the cycle more accurate.<\/p>\n<\/blockquote>\n<p align=\"justify\">Well, we&#8217;ve all seen very much worse explanations than that!<\/p>\n<ul>\n<li>The date is the first full moon after the equinox.<\/li>\n<li>The &#8220;equinox&#8221; is deemed to be March 21st (it wobbles a bit in reality).<\/li>\n<li>The phases of the moon are calculated based on a 19-year cycle.<\/li>\n<li>Dionysius Exiguus produced the modern version of the calculation, for the Julian calendar.<\/li>\n<li>The Gregorian calendar tweaked it for accuracy.<\/li>\n<\/ul>\n<p align=\"justify\">I could only wish that our succinct author had also stated what are these &#8220;correction factors&#8221; in the Gregorian system.<\/p>\n<p align=\"justify\">The big omission from that page is any indication of <strong>why<\/strong> we want the first Sunday after the full moon after the equinox.\u00a0 The reason is that the first full moon after the equinox is <em>passover<\/em>.\u00a0 This festival predated the solar calendar, so is calculated by the moon.\u00a0 Jesus was executed on passover, and rose on&#8230; the Sunday after.\u00a0 Easter celebrates that event.<\/p>\n<p align=\"justify\">It is so uncommon to see all these details put together, that there are many people who suppose that a weird date based on the moon must be prehistoric pagan or something.\u00a0 Nobody is taught this.\u00a0 It is never explained.<\/p>\n<p align=\"justify\">Of course the PHP function is purely concerned with the mathematics.\u00a0 But at least it states these very correctly.<\/p>\n<p align=\"justify\">It is rather a delight to see a clear and concise statement of the main points of the calculation.<\/p>\n<p align=\"justify\"><a href=\"https:\/\/roger-pearse.com\/weblog\/wp-content\/uploads\/2022\/01\/php_easter_date.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32863\" src=\"https:\/\/roger-pearse.com\/weblog\/wp-content\/uploads\/2022\/01\/php_easter_date.jpg\" alt=\"\" width=\"1904\" height=\"896\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Computer programs need to calculate the date of Easter sometimes.\u00a0 In the PHP programming language, there is a function, easter_date, which is used for the purpose.\u00a0 The manual page is here, and is really rather good! The date of Easter Day was defined by the Council of Nicaea in AD325 as the Sunday after the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[19],"tags":[614],"class_list":["post-32862","post","type-post","status-publish","format-standard","hentry","category-from-my-diary-announcements","tag-easter"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/posts\/32862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/comments?post=32862"}],"version-history":[{"count":0,"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/posts\/32862\/revisions"}],"wp:attachment":[{"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/media?parent=32862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/categories?post=32862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/roger-pearse.com\/weblog\/wp-json\/wp\/v2\/tags?post=32862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}