summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/projlib/old-modules/PJLdate.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/projlib/old-modules/PJLdate.sty')
-rw-r--r--Master/texmf-dist/tex/latex/projlib/old-modules/PJLdate.sty74
1 files changed, 74 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/projlib/old-modules/PJLdate.sty b/Master/texmf-dist/tex/latex/projlib/old-modules/PJLdate.sty
new file mode 100644
index 00000000000..783f164e7a9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/projlib/old-modules/PJLdate.sty
@@ -0,0 +1,74 @@
+%%
+%% This is file `PJLdate.sty',
+%% generated with the docstrip utility.
+
+%% Copyright (C) 2021 by Jinwen XU
+%%
+%% This is part of the ProjLib Toolkit.
+%%
+%% This work may be distributed and/or modified under the conditions of the
+%% LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[2020-10-01]
+\ProvidesPackage{PJLdate}
+ [2021/12/16 Convert yyyy-mm-dd to normal datetime format]
+\RequirePackage{kvoptions}
+\RequirePackage{etoolbox}
+\SetupKeyvalOptions{
+ family = @PJLdate,
+ prefix = @PJLdate@,
+}
+\DeclareBoolOption[false]{draft}
+\DeclareBoolOption[false]{fast}
+\ProcessKeyvalOptions*\relax
+\if@PJLdate@draft
+ \@PJLdate@fasttrue
+\fi
+\DeclareDocumentCommand{\TheDate}{}{\PJLdate}
+\DeclareDocumentCommand{\PLdate}{}{\PJLdate}
+\if@PJLdate@fast\let\PJLdate\relax\endinput\fi
+
+\RequirePackage{PJLlang}
+
+\robustify\@latex@warning@no@line
+
+\RequirePackage{silence}
+\WarningFilter*{datetime2}{Date-Time Language Module}
+\PassOptionsToPackage{fr-FR,en-US}{datetime2}
+\RequirePackage{datetime2}
+\RequirePackage{zhnumber}
+
+\let\@DTMdate@PJLoriginal\@DTMdate
+\gappto{\PJLlang@langconfig@common}{%
+ \let\@DTMdate\@DTMdate@PJLoriginal%
+}
+\gappto{\PJLlang@langconfig@CN}{%
+ \renewcommand*{\@DTMdate}[1]{%
+ \expandafter\@dtm@parsedate#1\@dtm@endparsedate%
+ \zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
+ }%
+}
+\gappto{\PJLlang@langconfig@TC}{%
+ \renewcommand*{\@DTMdate}[1]{%
+ \expandafter\@dtm@parsedate#1\@dtm@endparsedate%
+ \zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
+ }%
+}
+\gappto{\PJLlang@langconfig@JP}{%
+ \renewcommand*{\@DTMdate}[1]{%
+ \expandafter\@dtm@parsedate#1\@dtm@endparsedate%
+ \zhdate{\@dtm@year/\@dtm@month/\@dtm@day}%
+ }%
+}
+
+\providecommand*{\PJLdate}[1]{\DTMdate{#1}}
+
+\endinput
+%%
+%% End of file `PJLdate.sty'.