<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">erh, you defined it right there in \mydate but your not using it in the
redefinition of \today.</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof"><br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">So what actually is the problem with the example?<br>
</span></div>
<div class="elementToProof">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div></div>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><br>
</div>
<div style="font-family:Tahoma; font-size:13px"><br>
<b><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(23, 78, 134);">Lars Madsen</span></b></div>
<div style=""><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Programmør</span></div>
<div style=""><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"></span><br>
<span style="font-family: Calibri, Helvetica, sans-serif;"></span><b><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(23, 78, 134);">Institut for Matematik</span></b><br>
<span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Aarhus Universitet</span></div>
<div style=""><br>
<span style="font-family: Calibri, Helvetica, sans-serif;"></span></div>
<div style=""><a href="https://person.au.dk/daleif@math" title="https://person.au.dk/daleif@math"><span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">person.au.dk/daleif@math</span></a><br>
</div>
<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)"></span><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> texhax <texhax-bounces+daleif=imf.au.dk@tug.org> on behalf of Haines Brown <haines@histomat.net><br>
<b>Sent:</b> 07 December 2022 14:30<br>
<b>To:</b> texhax@tug.org <texhax@tug.org><br>
<b>Subject:</b> redefine date format in letter environment</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">I want today's date to appear: 2022.21.07 rather than 2022.21.7<br>
<br>
\documentclass[letterpaper,12pt]{letter}<br>
<br>
\usepackage{fontspec}<br>
\usepackage{libertinus-otf}<br>
<br>
\def\mydate{\leavevmode\hbox{\the\year.\twodigits\month.\twodigits\day}}<br>
\def\twodigits#1{\ifnum#1<10 0\fi\the#1}<br>
\renewcommand*\today{\number\year.\number\month.\number\day}<br>
<br>
\begin{document}<br>
\begin{letter}{}<br>
<br>
\opening{}<br>
<br>
\end{letter}<br>
\end{document}<br>
<br>
<br>
-- <br>
<br>
Haines Brown <br>
/"\<br>
\ / ASCII Ribbon Campaign<br>
X against HTML e-mail <br>
/ \<br>
<br>
</div>
</span></font></div>
</body>
</html>