I am trying to make dates in my CV uniform so I thought of using the datetime2
package. The problem is that sometime I have a full date, sometimes the year and the month, and sometimes only the month. I couldn't find a way to do this with the commands provided by the package. What I would like to accomplish is something like this:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[USenglish]{babel}
\usepackage[useregional]{datetime2}
\selectlanguage{USenglish}
\begin{document}
\DTMdate{2019-1-15}
\DTMdate{2019-1} % <- error here
2019 % I don't need special command here
\end{document}
Is there a way to extend the package to accomplish this? Or is there perhaps a better package to do this properly? I also need data ranges.