4

I am working through the warnings and errors of a project of mine. One error that has been bugging me is in regards to the datetime2 package. The following code

\documentclass[margin=1mm]{standalone}
\usepackage[norsk,nynorsk]{babel}
\usepackage[useregional,calc]{datetime2}
\DTMsetstyle{norsk}

\begin{document}
\today
\end{document}

correctly produces

enter image description here

However, it also generates the error

Package datetime2 Warning: Date-Time Language Module `nynorsk' not installed on input line 1882.

The warning is clear since there exists no Date-Time Language Module nynorsk. Now, nynorsk is just a dialect of norsk, and thus should use precicely the same time and date format as norsk.

  • Is there a way to define a language to use the time settings from another language without generating the warning?
0

1 Answer 1

4

You can create a nynorsk module by making a file datetime2-nynorsk.ldf containing

\ProvidesDateTimeModule{nynorsk}
\RequireDateTimeModule{norsk}

Just put the file in the same directory as your .tex file, or in a path contained in TEXINPUTS. Then

\documentclass{article}
\usepackage[norsk,nynorsk]{babel}
\usepackage[useregional,calc]{datetime2}

\begin{document}
\today
\end{document}

produces

Sample output

without any warnings.

You must log in to answer this question.

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