From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81255 Path: news.gmane.org!not-for-mail From: "H. van der Meer" Newsgroups: gmane.comp.tex.context Subject: date handling maltreated? Date: Wed, 20 Mar 2013 16:40:07 +0100 Message-ID: <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="===============0173904197==" X-Trace: ger.gmane.org 1363794021 6513 80.91.229.3 (20 Mar 2013 15:40:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Mar 2013 15:40:21 +0000 (UTC) To: ConTeXt NTG Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 20 16:40:43 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 1UIL85-0004h5-76 for gctc-ntg-context-518@m.gmane.org; Wed, 20 Mar 2013 16:40:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D8AB010204; Wed, 20 Mar 2013 16:40:17 +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 a8MDAtyTNnG0; Wed, 20 Mar 2013 16:40:12 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 53158101EA; Wed, 20 Mar 2013 16:40:12 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DAD77101EA for ; Wed, 20 Mar 2013 16:40: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 WRyCPJnBE5FW for ; Wed, 20 Mar 2013 16:40:09 +0100 (CET) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 6C460101E3 for ; Wed, 20 Mar 2013 16:40:09 +0100 (CET) Original-Received: from ezel.ic.uva.nl (ezel.ic.uva.nl [146.50.108.158]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2KFe8os032400 for ; Wed, 20 Mar 2013 16:40:08 +0100 Original-Received: from elhalyn-ethernet.fritz.box (a82-95-102-36.adsl.xs4all.nl [82.95.102.36]) (authenticated bits=0) by ezel.ic.uva.nl (8.13.8/8.13.8) with ESMTP id r2KFe7Wh018402 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 20 Mar 2013 16:40:08 +0100 X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.9757 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=146.50.108.158; country=NL; region=07; city=Amsterdam; latitude=52.3500; longitude=4.9167; http://maps.google.com/maps?q=52.3500,4.9167&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0TJdPE8KU - c412a58381df - 20130320 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:81255 Archived-At: --===============0173904197== Content-Type: multipart/alternative; boundary="Apple-Mail=_05B51897-3754-42E8-AECF-077E0C3F2EA0" --Apple-Mail=_05B51897-3754-42E8-AECF-077E0C3F2EA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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 (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; .. 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=20 > \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=20 > macro:->\currenttime -> \currenttime=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. Hans van der Meer --Apple-Mail=_05B51897-3754-42E8-AECF-077E0C3F2EA0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
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

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