Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've tried googling around and all I have found is a lot of example on how to format \today. But that isn't what I want. Instead, I want a way to format historical dates based on the localization given to babel.

Say, 'June 3rd 1994' in USenglish and UKenglish?

share|improve this question
4  
Maybe datetime is an option: ctan.org/pkg/datetime –  Marco Daniel Nov 1 '13 at 19:55
    
So, you want to be able to write something like \catInBox and get back August 12, 1887 (Schrodinger's birthday)? –  MaxGraves Nov 1 '13 at 20:24
1  
I want to give something like {June, 3, 1994} and get back June 3rd 1994, 3rd June 1994, 6 Juin 1994,3 de junio 1994, etc. Depending on the language/localization of the document. –  NictraSavios Nov 8 '13 at 9:07
add comment

1 Answer

up vote 5 down vote accepted

Here's how to do it using datetime :

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[USenglish,UKenglish,french,spanish,italian]{babel}
\usepackage[nodayofweek,level]{datetime}

\newcommand{\mydate}{\formatdate{3}{6}{1994}}

\begin{document}
\selectlanguage{USenglish}
\mydate

\selectlanguage{UKenglish}
\mydate

\selectlanguage{french}
\mydate

\selectlanguage{spanish}
\mydate

\selectlanguage{italian}
\mydate

\end{document}

Result:

Image of result

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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