Hi all,
Today I wanted to use the command \date[d=15,m=10,y=2010][weekday].
It gives Friday as it should. However
\date[d=2,m=1,y=2011][weekday] gives the same result which is wrong
(it's a Sunday). In fact, whatever the supplied date, it gives
Friday. I guess the parameter isn't taken into
On Fri, Oct 15 2010, Cedric Mauclair wrote:
Today I wanted to use the command \date[d=15,m=10,y=2010][weekday].
It gives Friday as it should. However
\date[d=2,m=1,y=2011][weekday] gives the same result which is wrong
(it's a Sunday). In fact, whatever the supplied date, it gives
Friday. I
I use the minimal from 3 days ago.
Here is what I do actually.
\def\mydate{\doifnextcharelse\space\domydate\domydate }
\def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]}
\mydate 2/1/2011 -- Friday 2 january 2011
\date[d=2,m=1,y=2011][weekday,day+,month,year] -- Sunday 2
On Fri, Oct 15 2010, Cedric Mauclair wrote:
Any ideas?
Test file:
\def\mydate{\doifnextcharelse\space\domydate\domydate }
\def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]}
\starttext
\mydate 2/1/2011 \par % token #3 = 2
\mydate 2/1/2 \par % token #3 = 2
\mydate
Right, I forgot about the catcodes. Thank you.
-- Cédric
On Fri, Oct 15, 2010 at 15:37, Peter Münster pmli...@free.fr wrote:
On Fri, Oct 15 2010, Cedric Mauclair wrote:
Any ideas?
Test file:
\def\mydate{\doifnextcharelse\space\domydate\domydate }
\def\domydate