ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Problem with \date command
@ 2010-10-15 12:10 Cedric Mauclair
  2010-10-15 13:14 ` Peter Münster
  0 siblings, 1 reply; 5+ messages in thread
From: Cedric Mauclair @ 2010-10-15 12:10 UTC (permalink / raw)
  To: ConTeXt-mailinglist

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problem with \date command
  2010-10-15 12:10 Problem with \date command Cedric Mauclair
@ 2010-10-15 13:14 ` Peter Münster
  2010-10-15 13:21   ` Cedric Mauclair
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2010-10-15 13:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problem with \date command
  2010-10-15 13:14 ` Peter Münster
@ 2010-10-15 13:21   ` Cedric Mauclair
  2010-10-15 13:37     ` Peter Münster
  0 siblings, 1 reply; 5+ messages in thread
From: Cedric Mauclair @ 2010-10-15 13:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <pmlists@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problem with \date command
  2010-10-15 13:21   ` Cedric Mauclair
@ 2010-10-15 13:37     ` Peter Münster
  2010-10-15 13:49       ` Cedric Mauclair
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Münster @ 2010-10-15 13:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problem with \date command
  2010-10-15 13:37     ` Peter Münster
@ 2010-10-15 13:49       ` Cedric Mauclair
  0 siblings, 0 replies; 5+ messages in thread
From: Cedric Mauclair @ 2010-10-15 13:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Right, I forgot about the catcodes. Thank you.

-- Cédric



On Fri, Oct 15, 2010 at 15:37, Peter Münster <pmlists@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-15 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-15 12:10 Problem with \date command Cedric Mauclair
2010-10-15 13:14 ` Peter Münster
2010-10-15 13:21   ` Cedric Mauclair
2010-10-15 13:37     ` Peter Münster
2010-10-15 13:49       ` Cedric Mauclair

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).