I'm using \dayofweekname from the datetime package.
Given \dayofweekname{2011}{03}{22} the result is 'Tuesday'.
This works fine on normal lines, but results in an error in section titles.
Min. Working Example
Code: Select all
\documentclass{article}
\usepackage{datetime}
\begin{document}
\dayofweekname{22}{03}{2011}
\section{Date}
\section{Date \dayofweekname{22}{03}{2011} }
\end{document}
Code: Select all
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./ConstantsProblem.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, ukenglish, loaded.
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/datetime/datetime.sty
(/usr/share/texmf-texlive/tex/latex/fmtcount/fmtcount.sty
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty)
(/usr/share/texmf-texlive/tex/latex/fmtcount/fc-english.def)
(/usr/share/texmf-texlive/tex/latex/fmtcount/fc-UKenglish.def)
(/usr/share/texmf-texlive/tex/latex/fmtcount/fc-british.def)
(/usr/share/texmf-texlive/tex/latex/fmtcount/fc-USenglish.def)
No configuration file fmtcount.cfg found.
)) (./ConstantsProblem.aux))
! Incomplete \iffalse; all text was ignored after line 10.
<inserted text>
\fi
<*> ConstantsProblem.tex
?
Can the result of \dayofweekname{22}{03}{2011}, ie 'Tuesday', be stored in a variable using something like \let or \def or ... ?
Any ideas gratefully received.
Thanks