[NTG-context] Problem with \date command
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 account here. Bug or feature? -- Cédric ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \date command
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 guess the parameter isn't taken into account here. No problem here: \starttext \doifmodeelse{mkiv}{MKIV}{MKII}: Sunday = \date[d=2,m=1,y=2011][weekday] ? \stoptext Perhaps you use a very old version? There was a bug more than 2 years ago: http://archive.contextgarden.net/message/20080331.082509.7fc304a9.en.html Peter -- Contact information: http://pmrb.free.fr/contact/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \date command
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 january 2011 Any ideas? -- Cédric On Fri, Oct 15, 2010 at 15:14, Peter Münster pmli...@free.fr wrote: \doifmodeelse{mkiv}{MKIV}{MKII}: Sunday = \date[d=2,m=1,y=2011][weekday] ? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \date command
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 2/1/{2011} \par % token #3 = 2011 \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \date command
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 #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 2/1/{2011} \par % token #3 = 2011 \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___