{
  "id": 19346493,
  "title": "A faster Easter date function",
  "url": "https://urgent.news/2026/11/10/a-faster-easter-date-function",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-10T14:36:45.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://www.benjoffe.com/fast-easter"
  },
  "original_language": "en",
  "account": "This article details a fast algorithm for calculating the date of Easter based on the Gregorian calendar rules. The First Council of Nicaea established the foundation for Easter in 325 AD, which was later modified by Pope Gregory XIII in 1582. The Church of England began observing the new date in 1753, while Eastern/Orthodox churches still follow the original rules. The new Gregorian Easter function, presented in this article, is significantly faster than typical alternatives found in date libraries. The function's speed is attributed to its simplicity, using only five multiplications compared to ten or more in standard algorithms. Additionally, the function has a broad accuracy range, spanning approximately -11m to +16m years, which covers all signed or unsigned 32-bit rata die dates. The function contains more terms than traditional Easter functions, but its compiled assembly is smaller. The article explains the main tricks used in the function, including adding a SHIFT value to the input, which aligns the century and increases the coverage range of the Easter pattern. Another trick is a clever use of MOD 30, which is different from the modulo operator in C for negative numbers. Finally, the article discusses the use of a single multiplication for computing year % 19 and how to eliminate the % 7 term in the final result.",
  "summary": null,
  "key_points": [
    "Function calculates Easter date using Gregorian calendar rules",
    "Faster than typical alternatives with only five multiplications",
    "Accurate for -11m to +16m years, covering 32-bit rata die dates"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}