| 1 |
%% |
| 2 |
%% This is file `babel-ca-julian.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% babel.dtx (with options: `ca-julian') |
| 8 |
%% |
| 9 |
%% |
| 10 |
%% Copyright (C) 2012-2026 Javier Bezos and Johannes L. Braams. |
| 11 |
%% Copyright (C) 1989-2012 Johannes L. Braams and |
| 12 |
%% any individual authors listed elsewhere in this file. |
| 13 |
%% All rights reserved. |
| 14 |
%% |
| 15 |
%% |
| 16 |
%% This file is part of the Babel system. |
| 17 |
%% -------------------------------------- |
| 18 |
%% |
| 19 |
%% It may be distributed and/or modified under the |
| 20 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 21 |
%% of this license or (at your option) any later version. |
| 22 |
%% The latest version of this license is in |
| 23 |
%% http://www.latex-project.org/lppl.txt |
| 24 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 25 |
%% version 2003/12/01 or later. |
| 26 |
%% |
| 27 |
%% This work has the LPPL maintenance status "maintained". |
| 28 |
%% |
| 29 |
%% The Current Maintainer of this work is Javier Bezos. |
| 30 |
%% |
| 31 |
%% The list of derived (unpacked) files belonging to the distribution |
| 32 |
%% and covered by LPPL is defined by the unpacking scripts (with |
| 33 |
%% extension |.ins|) which are part of the distribution. |
| 34 |
%% |
| 35 |
\def\bbl@fpmod#1#2{(#1-#2*floor(#1/#2))} |
| 36 |
\def\bbl@cs@gregleap#1{% |
| 37 |
(\bbl@fpmod{#1}{4} == 0) && |
| 38 |
(!((\bbl@fpmod{#1}{100} == 0) && (\bbl@fpmod{#1}{400} != 0)))} |
| 39 |
\def\bbl@cs@jd#1#2#3{% year, month, day |
| 40 |
\fpeval{ 1721424.5 + (365 * (#1 - 1)) + |
| 41 |
floor((#1 - 1) / 4) + (-floor((#1 - 1) / 100)) + |
| 42 |
floor((#1 - 1) / 400) + floor((((367 * #2) - 362) / 12) + |
| 43 |
((#2 <= 2) ? 0 : (\bbl@cs@gregleap{#1} ? -1 : -2)) + #3) }} |
| 44 |
\def\bbl@ca@julian#1-#2-#3\@@#4#5#6{% |
| 45 |
\edef\bbl@tempj{\fpeval{floor(\bbl@cs@jd{#1}{#2}{#3}) + .5}}% |
| 46 |
\edef\bbl@tempa{\fpeval{\bbl@tempj + 32082.5}}% |
| 47 |
\edef\bbl@tempb{\fpeval{floor((4 * \bbl@tempa + 3) / 1461)}}% |
| 48 |
\edef\bbl@tempc{\fpeval{\bbl@tempa - floor(1461*\bbl@tempb/4)}}% |
| 49 |
\edef\bbl@tempd{\fpeval{floor((5 * \bbl@tempc + 2) / 153)}}% |
| 50 |
\edef#6{\fpeval{\bbl@tempc - floor((153*\bbl@tempd+2) / 5) + 1}}% |
| 51 |
\edef#5{\fpeval{\bbl@tempd + 3 - 12 * floor(\bbl@tempd / 10)}}% |
| 52 |
\edef#4{\fpeval{\bbl@tempb - 4800 + floor(\bbl@tempd / 10)}}} |
| 53 |
\endinput |
| 54 |
%% |
| 55 |
%% End of file `babel-ca-julian.tex'. |