I was wondering if there exists such a package, or an option, to write the date in the form 31.1.2012 for example, and then have LaTeX present it as "January 31, 2012". I am actually using LyX and there is an "environment" to put date, However, it puts it in the same manner I am writing it, and for ease of writing I would like to write only numbers.


How about this?


The datetime package provides the commands \usdate and \formatdate (note that \usdate redefines \today). The macro \innermydate sets up the format in which to input dates. You could say \innermydate1.1.2001 but the syntax with braces is nicer in my opinion, so I borrowed a neat trick from this answer to facilitate it.

  • Thanks. It does work for LaTex, however in LyX it is a problem, since I can't use 'mydate' inside the document (I can write a 'TeX' line inside, but it doesn't output well). Is there a simple solution that will be convenient with LyX? – Stewie Jan 31 '12 at 14:15
  • 1
    I'm afraid I don't know. I can only answer the LaTeX part. I hate LyX! – Ian Thompson Jan 31 '12 at 14:25

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.