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?

3
  • check package isodate. Commented May 21, 2014 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. Commented May 21, 2014 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
    Commented May 22, 2014 at 2:51

1 Answer 1

4

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

You must log in to answer this question.

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