File 9124-Clarify-proleptic-Gregorian-calendar.patch of Package erlang
From b53d236d8f4ad4fb45dc999f7edec0701c2b93c6 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Tue, 13 Jan 2026 10:59:38 +0100
Subject: [PATCH 4/4] Clarify proleptic Gregorian calendar
---
lib/stdlib/src/calendar.erl | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/stdlib/doc/src/calendar.xml b/lib/stdlib/doc/src/calendar.xml
index 589d457f4a..6e3f14d0dd 100644
--- a/lib/stdlib/doc/src/calendar.xml
+++ b/lib/stdlib/doc/src/calendar.xml
@@ -54,15 +54,16 @@
and the Netherlands adopted it in 1698, England followed in 1752,
and Russia in 1918 (the October revolution of 1917 took place in
November according to the Gregorian calendar).</p>
- <p>The Gregorian calendar in this module is extended back to year 0 and also
- supports negative years (proleptic Gregorian calendar).
+ <p>The Gregorian calendar in this module is extended back (proleptic
+ Gregorian calendar) beyond year 0 to negative years.
For a given date, the <em>gregorian days</em> is the number of
- days up to and including the date specified.
- Negative years use astronomical year numbering where year 0 = 1 BCE,
- year -1 = 2 BCE, etc. Similarly,
- the <em>gregorian seconds</em> for a specified date and time is
- the number of seconds up to and including the specified date
- and time.</p>
+ days from Jan 1 year 0 up to the date specified.
+ Similarly, the <em>gregorian seconds</em> for a specified
+ date and time is the number of seconds from 0:00 Jan 1 year 0 up to
+ the specified date and time.</p>
+ <p>Non-positive years use astronomical year numbering where year 0 = 1 BCE/BC,
+ year -1 = 2 BCE/BC, and so on, because in the CE+BCE and AD+BC year numberings
+ there is no year 0. Instead 1 CE (AD 1) is preceded by 1 BCE (1 BC).</p>
<p>For computing differences between epochs in time, use
the functions counting gregorian days or seconds. If epochs are
specified as local time, they must be converted to universal time
--
2.51.0