4

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?

  • check package isodate. – Ulrike Fischer May 21 '14 at 12:45
  • Thank you for the useful reference. Please answer the question next so I can accept your answer and mark this question as answered. By the way, you will then get the proper reputation. – Nick Lehmann May 21 '14 at 12:55
  • I tend to use datetime, sometimes together with datenumber and fp. 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 (overriding babel). – cfr May 22 '14 at 2:51
4

Check package isodate. It provides various output formats and language support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.