%%
%% This is file `babel-ca-coptic.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% babel.dtx  (with options: `ca-coptic')
%% 
%%
%% Copyright (C) 2012-2026 Javier Bezos and Johannes L. Braams.
%% Copyright (C) 1989-2012 Johannes L. Braams and
%%           any individual authors listed elsewhere in this file.
%% All rights reserved.
%%
%%
%% This file is part of the Babel system.
%% --------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Javier Bezos.
%%
%% The list of derived (unpacked) files belonging to the distribution
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension |.ins|) which are part of the distribution.
%%
\def\bbl@fpmod#1#2{(#1-#2*floor(#1/#2))}
\def\bbl@cs@gregleap#1{%
  (\bbl@fpmod{#1}{4} == 0) &&
    (!((\bbl@fpmod{#1}{100} == 0) && (\bbl@fpmod{#1}{400} != 0)))}
\def\bbl@cs@jd#1#2#3{% year, month, day
  \fpeval{ 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@cs@gregleap{#1} ? -1 : -2)) + #3) }}
\def\bbl@ca@coptic#1-#2-#3\@@#4#5#6{%
  \edef\bbl@tempd{\fpeval{floor(\bbl@cs@jd{#1}{#2}{#3}) + 0.5}}%
  \edef\bbl@tempc{\fpeval{\bbl@tempd - 1825029.5}}%
  \edef#4{\fpeval{%
    floor((\bbl@tempc - floor((\bbl@tempc+366) / 1461)) / 365) + 1}}%
  \edef\bbl@tempc{\fpeval{%
     \bbl@tempd - (#4-1) * 365 - floor(#4/4) - 1825029.5}}%
  \edef#5{\fpeval{floor(\bbl@tempc / 30) + 1}}%
  \edef#6{\fpeval{\bbl@tempc - (#5 - 1) * 30 + 1}}}
\endinput
%%
%% End of file `babel-ca-coptic.tex'.
