# Conflict between polyglossia and datetime package

The goal of my document is to have a date in the following format <AAAA> <month> le <JJ>, so I use the following code:

\documentclass[a4paper,12pt,oneside]{article}
\usepackage{fontspec}
\usepackage[latin,russian,greek,french,francais]{babel}
\usepackage{fontenc}
\usepackage[nodayofweek]{datetime}

\newdateformat{fauvedate}{\THEYEAR{} \shortmonthname[\THEMONTH]{} le {\THEDAY}}

\begin{document}

\fauvedate\today

\end{document}


And I correctly get:

But, when I add polyglossia like in the following code:

\documentclass[a4paper,12pt,oneside]{article}
\usepackage{fontspec}
\usepackage[latin,russian,greek,french,francais]{babel}
\usepackage{fontenc}
\usepackage[nodayofweek]{datetime}

\usepackage{polyglossia}
\setmainlanguage{french}

\newdateformat{fauvedate}{\THEYEAR{} \shortmonthname[\THEMONTH]{} le {\THEDAY}}

\begin{document}

\fauvedate\today

\end{document}


I get the date like if I don’t use \fauvedate:

So, how can I have in the same time polyglossia and my special date style?

First of all you should not load both babel and polyglossia.

It's a bit unfortunate that, due to how polyglossia sets a definition for \today, you need to set the language before loading datetime.

\documentclass[a4paper,12pt,oneside]{article}

\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{french}

\usepackage[nodayofweek]{datetime}

\newdateformat{fauvedate}{\THEYEAR{} \shortmonthname[\THEMONTH]{} le {\THEDAY}}

\begin{document}

\fauvedate\today

\end{document}


• I just ran into same problem. Loading babel after datetime destroys the date adjustment, including "\newdateformat". Appears to me that anybody who uses datetime should be urged to always put \usepackage{babel} right before that. Or polylossia. Feb 25 '18 at 22:06