From: Stefan Huber Date: Thu, 3 Nov 2022 09:13:00 +0000 (+0100) Subject: exsheet2: Fix \date X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=b3c33d2f663c92f94640fd6b4267775f9d8955ad;hp=abaa237391001127398bd6dd892a24cf1675caa1;p=exsheet.git exsheet2: Fix \date Invoking \date did not set the current date. Fix this. Required to switch to datetime2 package. --- diff --git a/exsheet2-demo-aufgabenblatt.tex b/exsheet2-demo-aufgabenblatt.tex index b20d15e..c6f3f63 100644 --- a/exsheet2-demo-aufgabenblatt.tex +++ b/exsheet2-demo-aufgabenblatt.tex @@ -6,7 +6,8 @@ \course{ILV Numerik und Industrielle Algorithmen} \curriculum{ITS} -\date{21.10.2022} +% Use current time if not set by \date +%\date{2022-10-21} \semester{WS 2022} \author{Stefan Huber} diff --git a/exsheet2-demo-klausur-en.tex b/exsheet2-demo-klausur-en.tex index eba9461..22d41f6 100644 --- a/exsheet2-demo-klausur-en.tex +++ b/exsheet2-demo-klausur-en.tex @@ -9,7 +9,7 @@ \course{ILV Network-oriented Software Engineering} \curriculum{ITS-B, ITSB-B, WIN} -\date{21.10.2022} +\date{2022-10-21} \semester{SS 2022} \author{Stefan Huber} diff --git a/exsheet2-demo-klausur.tex b/exsheet2-demo-klausur.tex index 6b60d1b..bcea46b 100644 --- a/exsheet2-demo-klausur.tex +++ b/exsheet2-demo-klausur.tex @@ -8,7 +8,7 @@ \course{VO Microcontroller} \curriculum{ITS-B, ITSB-B} -\date{21.10.2022} +\date{2022-10-21} \semester{SS 2022} \author{Stefan Huber} diff --git a/exsheet2.cls b/exsheet2.cls index c9a5826..250ea65 100644 --- a/exsheet2.cls +++ b/exsheet2.cls @@ -23,7 +23,6 @@ \@ifundefined{exsheetgerman}{ \usepackage[american]{babel} - \usepackage[american]{isodate} \newcommand{\theexercise}{Exercise} \newcommand{\thepoint}{Point} \newcommand{\thepoints}{Points} @@ -35,7 +34,6 @@ \newcommand{\theof}{of} }{% \usepackage[ngerman]{babel} - \usepackage[german]{isodate} \newcommand{\theexercise}{Aufgabe} \newcommand{\thepoint}{Punkt} \newcommand{\thepoints}{Punkte} @@ -47,6 +45,8 @@ \newcommand{\theof}{von} } +\usepackage[useregional]{datetime2} + \RequirePackage{xifthen,geometry,fancyhdr,enumitem,comment,amssymb} \newcounter{exsheet2@pointsum} @@ -108,6 +108,10 @@ \def\@instructions{\ } \newcommand{\instructions}[1]{\def\@instructions{#1}} +\let\olddate\date +\DTMsavenow{exsheet2@today} +\renewcommand{\date}[1]{\olddate{#1}\DTMsavedate{exsheet2@today}{#1}} + \geometry{a4paper,textwidth=16cm,textheight=23cm} @@ -124,7 +128,7 @@ \@semester } \fancyhead[C]{% - {\isodate \today} + {\DTMsetdatestyle{iso}\DTMusedate{exsheet2@today}} } \fancyhead[R]{% \@auth\\ @@ -194,7 +198,7 @@ \vspace*{1em} - \today\\ + {\DTMusedate{exsheet2@today}} \\ \vspace*{1em} \@curriculum \\