ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: date handling maltreated?
Date: Wed, 20 Mar 2013 16:45:52 +0100	[thread overview]
Message-ID: <7D1737F5-A372-442C-9516-8E9611F63BFC@gmail.com> (raw)
In-Reply-To: <9462A8BC-8415-4513-BC75-14411EAF988E@uva.nl>


[-- Attachment #1.1: Type: text/plain, Size: 2302 bytes --]


Am 20.03.2013 um 16:40 schrieb H. van der Meer <H.vanderMeer@uva.nl>:

> Trying to do some date and time processing myself, I ran into problems caused by ConTeXt makeing it incompatibel with the original plain TeX itself!
> 
> In the TeX-book, Appendix B one finds
> <citation>
> (Some parameters are set by TeX itself as it runs, so it is inappropriate to initialize them: \time, \day, \month, and year are established at the beginning of a job; ..
> </citation>
> 
> Now the results in ConTeXT with a minimal example, put into the log for easier copying into the mail:
> \starttext
> \writestatus{}{\meaning\date -> \date}
> \writestatus{}{\meaning\day -> \the\day}
> \writestatus{}{\meaning\month -> \month WHY NOT monthname?}
> \writestatus{}{\meaning\year -> \the\year}
> \writestatus{}{\meaning\time -> \the\time}
> \stoptext
> 
> Result:
> > \protected macro:->\dodoubleempty \syst_converters_date -> \date 
> > \day-> 20
> > macro:#1->\ctxcommand {monthname(#1)}-> \labeltext {unknown}HY NOT monthname?
> > \year-> 2013
> > \time-> 989
> 
> Plain TeX here gives:
> \message{\meaning\day -> \the\day}
> \message{\meaning\month -> \the\month}
> \message{\meaning\year -> \the\year}
> \message{\meaning\time -> \the\time}
> \end
> 
> Result:
> (./plaindates.tex \day-> 20 \month-> 3 \year-> 2013 \time-> 991 )
> 
> I strongly ask that ConTeXt abstains from changing the definition of \month and reverts to the exact result as given by plain TeX, i.e. a number in the range [1-12]. Because the change in ConTeXt makes it impossible to do calculations on the month.
> 
> Furthermore I encountered problems with defining expanded macros for currentdate and currenttime. This seems impossible to accomplish, at least in a simple manner. See the results from these to examples:
> \edef\thedate{\currentdate}\writestatus{}{\meaning\thedate -> \thedate}
> \edef\thetime{\currenttime}\writestatus{}{\meaning\thetime -> \thetime}
> giving:
> > macro:->\currentdate -> \currentdate 
> > macro:->\currenttime -> \currenttime 
> 
> This is most unhappy, because one really should be able to put the expansions of these macros somewhere.
> I hope the next beta will have solutions for these problems.

TeX primitives are available under \normal…

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 5326 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

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

  reply	other threads:[~2013-03-20 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 15:40 H. van der Meer
2013-03-20 15:45 ` Wolfgang Schuster [this message]
2013-03-20 16:26   ` Meer H. van der
  -- strict thread matches above, loose matches on Subject: below --
2013-03-20 15:26 H. van der Meer
2013-03-20 15:27 ` Meer H. van der
2013-03-20 20:34 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7D1737F5-A372-442C-9516-8E9611F63BFC@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).