6

This is pretty straight-forward.

I have finally managed to abbreviate weeknames in “British”, i.e. en-GB. (What I need is ngerman)

But, as I'm working on a German document, I need the date format exactly like this: Mi, 18. November. Even better would be Mi, 18. Nov.

All I have managed is either Wed, 18. November, or Mittwoch, 18. November. If relevant, I'm using XeTeX on VerbTeX.

My Code/MWE:

\documentclass[%
letterpaper,%
ngerman,%
5pt,%
]{article}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\usepackage{ragged2e}
\usepackage[ngerman]{babel} 
\usepackage{isodate} 
\usepackage[%
useregional,
showdow,
ngerman,
]{datetime2}

\DTMlangsetup*[ngerman]{abbr}
\begin{document}
\DTMlangsetup*{showyear=false}
\DTMdate{2020-11-18}
\end{document}`
3
  • @leandriis Oh no, that means I have to dive into defining my own abbreviations.
    – Concerto
    Nov 16, 2020 at 21:42
  • Sorry for my previous, now deleted comment. I mixed something up. To get the abbreviated week day and month names, you can use \DTMlangsetup*[german]{abbr}.
    – leandriis
    Nov 16, 2020 at 21:45
  • @leandriis That's very good, question solved! Interesting, because it doesn't work with ngerman.
    – Concerto
    Nov 16, 2020 at 21:47

1 Answer 1

7

Use german (regionless style) instead of ngerman in the optional argument of \DTMlangsetup* as shown in the following example in order to get the abbreviated week day and month names. Alternatively, the german module for the datetime2 package, also offers de-DE, de-AT and de-CH for the corresponding regional variants.

\documentclass[%
letterpaper,%
ngerman,%
5pt,%
]{article}
\usepackage{babel} 
\usepackage[%
useregional,
showdow
]{datetime2}

\DTMlangsetup*[german]{abbr}
\begin{document}
\DTMlangsetup*{showyear=false}
\DTMdate{2020-11-18}
\end{document}

enter image description here


Background:

From the datetime2 documentation:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .