In LaTeX you can output the current date by writing \today
in your document. This is very handy if you want to set the date of the document to today. Normally I write the preamble of my documents like that:
\documentclass[12pt, a4paper]{article}
# \usepackage{} and things like that
\title{Title goes here}
\author{Nick Lehmann}
\date{\today}
\begin{document}
\maketitle
\end{document}
This is very handy because in most cases I don't have to care about the formatting of the date. But how is it possible to insert a custom date what will be formatted depending on the language setting? Is there something like \date{\custom_date{year}{month}{day}}
that produces dates like 1st January 2001
when using babel with the British option?
datetime
, sometimes together withdatenumber
andfp
. The combination of the last two is only needed if you want to calculate dates, though. The first alone handles language-dependent formatting of dates (overridingbabel
).