exsheet2: Fix \date
authorStefan Huber <stefan.huber@fh-salzburg.ac.at>
Thu, 3 Nov 2022 09:13:00 +0000 (10:13 +0100)
committerStefan Huber <stefan.huber@fh-salzburg.ac.at>
Thu, 3 Nov 2022 09:13:00 +0000 (10:13 +0100)
Invoking \date did not set the current date. Fix this. Required to
switch to datetime2 package.

exsheet2-demo-aufgabenblatt.tex
exsheet2-demo-klausur-en.tex
exsheet2-demo-klausur.tex
exsheet2.cls

index b20d15e17d944f2b4bf881bd2a48bc8597f7bf51..c6f3f63111b0da0114202c7f2b298c3202344e89 100644 (file)
@@ -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}
index eba9461ec69a00d8b5008ad837a452ad0ab3cb71..22d41f625c435f6481f6c9feb8170af27081de49 100644 (file)
@@ -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}
index 6b60d1b2be834f567f49ff6e74b02c6d89b9c53c..bcea46b04d830b0f14518b302e4b2b5b17a55e9b 100644 (file)
@@ -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}
index c9a5826548a3c01808f8bd4c9f41876d3af155a1..250ea65c96a4cac6e17dc2a39d4579d731ccb384 100644 (file)
@@ -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}
 \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}
 
     \@semester
   }
   \fancyhead[C]{%
-    {\isodate \today}
+    {\DTMsetdatestyle{iso}\DTMusedate{exsheet2@today}}
   }
   \fancyhead[R]{%
     \@auth\\
 
         \vspace*{1em}
 
-        \today\\
+        {\DTMusedate{exsheet2@today}} \\
 
         \vspace*{1em}
         \@curriculum \\