[OS X TeX] day of week in LaTeX for an arbitrary date

Ramón Figueroa-Centeno ramonf at hawaii.edu
Sat May 2 14:07:25 EDT 2009


Aloha,

In the document below I change the month, day and year, but \weekday in
eukdate does not reflect those changes. So when I typeset today (May 2,
2009) I get "Saturday, May 1, 2009" for \today instead of "Friday, May 1,
2009". 

Does anybody know what's wrong? How do I force eukdate to use my redefined
\day, \month and \year in its computations? Is there any package in TeX Live
2008 that does what I want?

(I would prefer not to use dates.sty
<http://tug.ctan.org/get/macros/latex209/contrib/misc/dates.sty> or dow
<http://tug.ctan.org/tex-archive/macros/generic/misc/dow.tex>; the first
because it is not part of a modern LaTeX installation (TeX Live) and the
second because it is clunky.)

Thanks,

Ramón

\documentclass{article}

% \changedate{month}{day}{year} changes the LaTeX date
\newcommand{\changedate}[3]{
\renewcommand{\month}{#1} 
\renewcommand{\day}{#2} 
\renewcommand{\year}{#3}
}

% Package to get weekday and month name.
\usepackage{eukdate}

% Change the \today command to show the day of the week
\renewcommand{\today}{\weekday, \monthname\ \day, \year}

\begin{document}

% \changedate{month}{day}{year}
\changedate{5}{1}{2009}

\today

\end{document}
-- 
View this message in context: http://n2.nabble.com/day-of-week-in-LaTeX-for-an-arbitrary-date-tp2771836p2771836.html
Sent from the MacOSX-TeX mailing list archive at Nabble.com.




More information about the MacOSX-TeX mailing list