2

What macros do I have to invoke to get the day of month, month, and year of the current date? I am a beginner in LaTeX.

  • \the\day--\the\month--\the\year? – Manuel Oct 23 '14 at 16:56
  • @Manuel: Oh you got it. What is the next thing you will do? – kiss my armpit Oct 23 '14 at 16:58
  • 1
    You're a beginner in LaTeX? – Sverre Oct 23 '14 at 17:10
  • @Sverre: Just to fool the system to increase the quality of my question. – kiss my armpit Oct 23 '14 at 18:45
  • I don't think "the system" has any way of estimating the quality of your question. Are you asking because you actually didn't know the macros, or are you asking because you think there should be a question-answer about this on TeX.sX? I'm just a bit confused about what you're up to here. – Sverre Oct 23 '14 at 18:59
3
\the\day--\the\month--\the\year

In case you want a verbose month, I think it's done in LaTeX with

\ifcase\month\or
  January\or
  February\or
  March\or
  April\or
  May\or
  June\or
  July\or
  August\or
  September\or
  October\or
  November\or
  December\fi

(Not sure if I wrote them correctly)

1

Have a look at Koma-Script package scrdate. Documentation of Koma-Script, look for scrdate

Example Commands:

\DayName{year}{month}{day}
\ISODayName{ISO-date}
\ISOToday
\todaysname
\todaysnumber

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.