When using scrlttr2 class with package datetime2 option numericaldate does not work
KOMA-Script is a bundle of versatile LaTeX classes and packages
Brought to you by:
kohm
When using scrlttr2
with option numericaldate
to get a numerical date instead of a symbolic date at the notepaper and also using package datetime2
to be able to use, e.g., \DTMtoday
to get a date with month name, the automatically printed date at the notepaper is also with month name instead of numerical:
\documentclass[12pt,a4paper,ngerman,numericaldate]{scrlttr2}
\usepackage{babel}
\usepackage[useregional]{datetime2}
\begin{document}
\begin{letter}{
An\\
alle Interessenten\\
00000 Hier
}
\opening{Hi,}
das aktuelle Datum ist \DTMtoday
\closing{Mit freundlichen Grüßen}
\end{letter}
\end{document}
This is not a bug of KOMA-Script. It is a kind of feature of package
datetime2
. The package explicitly usesto overwrite
scrlttr2
optionnumericaldate
. IMHO it would be better, ifdatetime2
would not do this, but this is an acceptable design decision of thedatetime2
author.As a workaround you can use:
As an alternative see the
datetime2
manual about configuredatetime2
to show the numerical date (and later reconfigure it to again show the textual date).From [r4107] you can alternatively use class
scrletter
or another class with packagescrletter
. For thosedatetime2
does not break optionnumericaldate
. But before with versions before [r4107] this would not work because of bug [#65].Related
Commit: [r4107]
Issues:
#65Last edit: Markus Kohm 2024-04-10