From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81258 Path: news.gmane.org!not-for-mail From: "Meer H. van der" Newsgroups: gmane.comp.tex.context Subject: Re: date handling maltreated? Date: Wed, 20 Mar 2013 17:26:03 +0100 Message-ID: <833BE773-3B7B-4BDF-BBAD-E3F9D857003B@uva.nl> References: <9462A8BC-8415-4513-BC75-14411EAF988E@uva.nl> <7D1737F5-A372-442C-9516-8E9611F63BFC@gmail.com> 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="===============1768592809==" X-Trace: ger.gmane.org 1363796772 5434 80.91.229.3 (20 Mar 2013 16:26:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Mar 2013 16:26:12 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Mar 20 17:26:38 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 1UILqX-0002n9-D4 for gctc-ntg-context-518@m.gmane.org; Wed, 20 Mar 2013 17:26:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 094E4101FB; Wed, 20 Mar 2013 17:26:14 +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 ab0Zl-7vd1aR; Wed, 20 Mar 2013 17:26:11 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 879C7101EB; Wed, 20 Mar 2013 17:26:11 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 42099101EB for ; Wed, 20 Mar 2013 17:26: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 m3+yXKp+fHzt for ; Wed, 20 Mar 2013 17:26:05 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 38183101EA for ; Wed, 20 Mar 2013 17:26:05 +0100 (CET) Original-Received: from ezel.ic.uva.nl (ezel.ic.uva.nl [146.50.108.158]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r2KGQ4CA013085 for ; Wed, 20 Mar 2013 17:26:04 +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 r2KGQ33H022634 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 20 Mar 2013 17:26:04 +0100 In-Reply-To: <7D1737F5-A372-442C-9516-8E9611F63BFC@gmail.com> X-Mailer: Apple Mail (2.1503) X-Bayes-Prob: 0.0001 (Score 0, 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: 0QJdQq4uf - 0c211dbe0df5 - 20130320 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:81258 Archived-At: --===============1768592809== Content-Type: multipart/alternative; boundary="Apple-Mail=_86AA0A67-E60C-45D2-BBFB-4DF14C298C86" --Apple-Mail=_86AA0A67-E60C-45D2-BBFB-4DF14C298C86 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On 20 mrt. 2013, at 16:45, Wolfgang Schuster = wrote: >=20 > Am 20.03.2013 um 16:40 schrieb H. van der Meer : >=20 >> 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. >=20 > TeX primitives are available under \normal=85 >=20 > Wolfgang >=20 That is most unfortunate. Why not keep compatibility with plain TeX = where possible? I see that \time, \day and \year have been left = untouched. So why messing up \month? Sorry for the expression, no = offense meant, but in my eyes this is unnecessary tinkering with = established macros. What speaks against keeping \month as is? And doing the translation = through \monthname? It looks to me even more transparent and it could = use the \language for translation. No, this shouldn't have happened and I strongly urge that the original = meaning returns to ConTeXt. --Apple-Mail=_86AA0A67-E60C-45D2-BBFB-4DF14C298C86 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 schuster.wolfgang@gmail.com>
 wrote:

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