From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81256 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: date handling maltreated? Date: Wed, 20 Mar 2013 16:45:52 +0100 Message-ID: <7D1737F5-A372-442C-9516-8E9611F63BFC@gmail.com> References: <9462A8BC-8415-4513-BC75-14411EAF988E@uva.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: multipart/mixed; boundary="===============0029387277==" X-Trace: ger.gmane.org 1363794369 10513 80.91.229.3 (20 Mar 2013 15:46:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Mar 2013 15:46:09 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 20 16:46:34 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UILDl-00005o-Nz for gctc-ntg-context-518@m.gmane.org; Wed, 20 Mar 2013 16:46:33 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5C4AC101EF; Wed, 20 Mar 2013 16:46:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 5UDeQByOMQe9; Wed, 20 Mar 2013 16:46:08 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 5D35B101EA; Wed, 20 Mar 2013 16:46:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 64DBA101EA for ; Wed, 20 Mar 2013 16:46:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Z3eFWFceDlzb for ; Wed, 20 Mar 2013 16:46:02 +0100 (CET) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id 920C7101E3 for ; Wed, 20 Mar 2013 16:46:02 +0100 (CET) Original-Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2KFjwGK025130 for ; Wed, 20 Mar 2013 16:45:58 +0100 Original-Received: by mail-ee0-f49.google.com with SMTP id d41so1103492eek.8 for ; Wed, 20 Mar 2013 08:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:content-type:message-id:mime-version:subject:date :references:to:in-reply-to:x-mailer; bh=aN1Io4GV3paaW5CckKKbZ8e9CJXBvw04oAEEgdEgwzU=; b=V8vPFnQAvnrurPdiztzAj6AAEzptbOnR6WhD36a1HqwyyyVtJk+QbZ5dGdErUWquIo HBoYBHanof0xi8jo2O4wRNx+40GmD4JRXpMWhmUCIDDl+jgkrEosrAKi+4IMjY33cbD5 ZrTbrbgfWAxbLw8J0hjfETBn9rI21jVKQ/zy8QBUUhVCcNgxZEbpNvRlL0oDbqQGyC0R R/KjUp1jPTZCvGFR3Y0NEadTuFweSNw70mkDwJq21Onlr3x4sAl46Za6XQxNRw05bH0Z p702BwgzqaoywIEbnRi4X06rnvbWtBeh5ynA5noGjZSy94mEKGd63He/Zg7XGFOvF7rr dqAg== X-Received: by 10.14.209.131 with SMTP id s3mr72571014eeo.26.1363794355516; Wed, 20 Mar 2013 08:45:55 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4dbfa320.pool.mediaWays.net. [77.191.163.32]) by mx.google.com with ESMTPS id s3sm3354334eem.4.2013.03.20.08.45.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Mar 2013 08:45:54 -0700 (PDT) In-Reply-To: <9462A8BC-8415-4513-BC75-14411EAF988E@uva.nl> X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.83.49; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04JdPJWx6 - 0c113a5f2944 - 20130320 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:81256 Archived-At: --===============0029387277== Content-Type: multipart/alternative; boundary="Apple-Mail=_51E1A082-AE08-42F4-8AF9-63CD925EC544" --Apple-Mail=_51E1A082-AE08-42F4-8AF9-63CD925EC544 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Am 20.03.2013 um 16:40 schrieb H. van der Meer : > 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! >=20 > In the TeX-book, Appendix B one finds > > (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; .. > >=20 > 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 >=20 > Result: > > \protected macro:->\dodoubleempty \syst_converters_date -> \date=20 > > \day-> 20 > > macro:#1->\ctxcommand {monthname(#1)}-> \labeltext {unknown}HY NOT = monthname? > > \year-> 2013 > > \time-> 989 >=20 > 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 >=20 > Result: > (./plaindates.tex \day-> 20 \month-> 3 \year-> 2013 \time-> 991 ) >=20 > 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. >=20 > 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=20 > > macro:->\currenttime -> \currenttime=20 >=20 > 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=85 Wolfgang --Apple-Mail=_51E1A082-AE08-42F4-8AF9-63CD925EC544 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 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\month = -> \month WHY NOT monthname?}
\writestatus{}{\meaning\year -> = \the\year}
\stoptext
> = \day-> 20
> = macro:#1->\ctxcommand {monthname(#1)}-> \labeltext {unknown}HY NOT = monthname?
> = \year-> 2013
> = \time-> 989
Plain TeX here = gives:
\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{}{\meanin= g\thedate -> = \thedate}
\edef\thetime{\currenttime}\writestatus{}{\meaning\the= time -> \thetime}
giving:
> macro:->\currentdate -> = \currentdate