With the \DTMdisplaydate{yyyy}{mm}{dd}{w} provided in datetime2, one can easily display a specific date. However, one cannot use it directly to display only the year and month, since the third argument cannot left empty. How should one display a time like 2022-01? (Here the option useregional is enabled, so the date should be displayed as a text string in the selected language)
Below is a MWE:
\documentclass{article}
\usepackage[ngerman,french,english]{babel}
\usepackage[useregional]{datetime2}
\begin{document}
\selectlanguage{french}
\DTMdate{2022-01-01}
\DTMdisplaydate{2022}{01}{01}{-1}
% \DTMdisplaydate{2022}{01}{}{-1}
\end{document}
