[latex3-commits] [git/LaTeX3-latex3-babel] main: Start calendars (Julian day). (a7f52e0)

Javier email at dante.de
Tue May 24 19:15:53 CEST 2022


Repository : https://github.com/latex3/babel
On branch  : main
Link       : https://github.com/latex3/babel/commit/a7f52e01772bd7effd38722d6066effa568825ed

>---------------------------------------------------------------

commit a7f52e01772bd7effd38722d6066effa568825ed
Author: Javier <email at localhost>
Date:   Tue May 24 19:15:53 2022 +0200

    Start calendars (Julian day).


>---------------------------------------------------------------

a7f52e01772bd7effd38722d6066effa568825ed
 README.md    |  11 ++++++++---
 babel.dtx    |  28 +++++++++++++++++++++++++---
 babel.ins    |   2 +-
 babel.pdf    | Bin 861855 -> 862648 bytes
 bbcompat.dtx |   2 +-
 5 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 2342eba..733704b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,6 @@
-## Babel 3.75
+## Babel 3.75.2747
+
+*(Development)*
 
 This package manages culturally-determined typographical (and other)
 rules, and hyphenation patterns for a wide range of languages. Many
@@ -8,9 +10,9 @@ is a set of ini files for about 250 languages.
 
 The latest stable version is available on <https://ctan.org/pkg/babel>.
 
-Changes in version 3.75 are described in:
+Changes in version 3.76 are described in:
 
-https://latex3.github.io/babel/news/whats-new-in-babel-3.75.html
+https://latex3.github.io/babel/news/whats-new-in-babel-3.76.html
 
 Apart from the manual, you can find information on some aspects of babel at:
 
@@ -46,6 +48,9 @@ respective authors.
 
 ### Summary of latest changes
 ```
+3.75   (dev)
+       * Start calendars.
+
 3.75   2022-05-22
        * `\BabelEnsureInfo` is active by default, to make sure the BCP 47
          codes are always available, as they may be required by the
diff --git a/babel.dtx b/babel.dtx
index 6bc32b0..06a32fc 100644
--- a/babel.dtx
+++ b/babel.dtx
@@ -32,7 +32,7 @@
 %
 % \iffalse
 %<*filedriver>
-\ProvidesFile{babel.dtx}[2022/05/22 v3.75 The Babel package]
+\ProvidesFile{babel.dtx}[2022/05/24 v3.75.2747 The Babel package]
 \documentclass{ltxdoc}
 \GetFileInfo{babel.dtx}
 \usepackage{fontspec}
@@ -5143,8 +5143,8 @@ help from Bernd Raichle, for which I am grateful.
 % \section{Tools}
 %
 %    \begin{macrocode}
-%<<version=3.75>>
-%<<date=2022/05/22>>
+%<<version=3.75.2747>>
+%<<date=2022/05/24>>
 %    \end{macrocode}
 %
 % \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -10795,6 +10795,28 @@ help from Bernd Raichle, for which I am grateful.
 \def\bbl at xdatecntr[#1|#2]{\localenumeral{#2}{#1}}
 %    \end{macrocode}
 %
+% \textbf{Calendars.} The code for specific calendars are placed in the
+% locales requiring it. Here we just define a few general macros,
+% particularly a funcion to get the julian day. It’s based on the
+% little library |calendar.js|, by John Walker, in the public domain.
+%
+%    \begin{macrocode}
+\ExplSyntaxOn
+\def\bbl at fpmod#1#2{(#1-#2*floor(#1/#2))}
+\def\bbl at cs@gregleap#1{%
+  (\bbl at fpmod{#1}{4} == 0) &&
+    (!((\bbl at fpmod{#1}{100} == 0) && (\bbl at fpmod{#1}{400} != 0)))}
+\def\bbl at ca@jd#1#2#3{% year, month, day
+  \fp_eval:n{ 1721424.5   + (365 * (#1 - 1)) +
+    floor((#1 - 1) / 4)   + (-floor((#1 - 1) / 100)) +
+    floor((#1 - 1) / 400) + floor((((367 * #2) - 362) / 12) +
+    ((#2 <= 2) ? 0 : (\bbl at cs@gregleap{#1} ? -1 : -2)) + #3) }}
+\newcommand\babelcalendar[2][\the\year-\the\month-\the\day]{%
+  \@nameuse{bbl at ca@#2}#1\@@}
+\ExplSyntaxOff
+%    \end{macrocode}
+%
+%
 % \textbf{Transforms.}
 %
 %    \begin{macrocode}
diff --git a/babel.ins b/babel.ins
index 188056d..f413103 100644
--- a/babel.ins
+++ b/babel.ins
@@ -26,7 +26,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
 %%
-\def\filedate{2022/05/22}
+\def\filedate{2022/05/24}
 \def\batchfile{babel.ins}
 \input docstrip.tex
 
diff --git a/babel.pdf b/babel.pdf
index 52960c9..513758e 100644
Binary files a/babel.pdf and b/babel.pdf differ
diff --git a/bbcompat.dtx b/bbcompat.dtx
index 725de44..9c70ba0 100644
--- a/bbcompat.dtx
+++ b/bbcompat.dtx
@@ -30,7 +30,7 @@
 %
 % \iffalse
 %<*dtx>
-\ProvidesFile{bbcompat.dtx}[2022/05/22 v3.75]
+\ProvidesFile{bbcompat.dtx}[2022/05/24 v3.75.2747]
 %</dtx>
 %
 %% File 'bbcompat.dtx'





More information about the latex3-commits mailing list.