tudace/tuda_latex_templates

\submissiondate and \examdate on first and second title page in different languages

Closed this issue · 3 comments

I am using the template for PhD theses in English,
with \usepackage[ngerman, main=english]{babel} and I set

\submissiondate{1. Januar 2024}
\examdatedate{1. Januar 2024}

On the title page, and
automatically apper after "Tag der Einreichung" and "Tag der Prüfung:". Here, I would like to have a German date format such as "1. Januar 2024".

However, on the second title page, where the dates are automatically set after "Date of Submission:" and "Date of thesis defense:", I would like to have an English date format, such as "January 1, 2024".

How can I set the dates so they are displayed in German on the title page and in the affidavit, but in English on the second title page?

In general the dates for \submissiondate and \examdate are different, so I opted for defining two language-dependent macros:

\newcommand{\mysubmissiondate}{%
  \iflanguage{english}{January 1, 2024}{1. Januar 2024}%
}

\newcommand{\myexamdate}{%
  \iflanguage{english}{February 2, 2025}{2. Februar 2025}%
}

\submissiondate{\mysubmissiondate}
\examdate{\myexamdate}

You don't need to wrap macros that way

 \examdate{\iflanguage{english}{February 2, 2025}{2. Februar 2025}}

works fine.

And you could also do the \month=2 within the \examdate variable in case you want to use two different dates and rely on \today