Re: [NTG-context] printing the current date
Hans Hagen schrieb am 27.01.2021 um 22:31: On 1/27/2021 6:28 PM, Peter Münster wrote: On Sun, Jan 10 2021, Peter Münster wrote: \currentdate% same as \date, but I would expect the day of today... Should I fill a bug-report on the tracker? Perhaps also for the missing space after \date[]? Reporting here is faster. Can (lazy me) Wolfgang confirm the issue? 1. Wrong date The \date command has wrong/weird grouping which makes global changes for the day, month and year. \permanent\tolerant\protected\def\date[#1]#*[#2]% {\dontleavehmode \ifparameter#1\or \begingroup \letdummyparameter\c!d\normalday \letdummyparameter\c!m\normalmonth \letdummyparameter\c!y\normalyear \getdummyparameters[#1]% \normalexpanded {\endgroup \normalday \number\directdummyparameter\c!d\relax \normalmonth\number\directdummyparameter\c!m\relax \normalyear \number\directdummyparameter\c!y\relax}% \fi ...} 2. Missing space When not all optional arguments are used the space after the last given argument is gobbled. This was normal behavior for a long time until you changed the code in MkIV to keep them. \tolerant\def\foo[#1]#*[#2]% {[#1][#2]} \starttext a \foo [1] b a \foo [1] [2] b \stoptext Wolfgang ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] printing the current date
On 1/27/2021 6:28 PM, Peter Münster wrote: On Sun, Jan 10 2021, Peter Münster wrote: \currentdate% same as \date, but I would expect the day of today... Should I fill a bug-report on the tracker? Perhaps also for the missing space after \date[]? Reporting here is faster. Can (lazy me) Wolfgang confirm the issue? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] printing the current date
On Sun, Jan 10 2021, Peter Münster wrote: > \currentdate% same as \date, but I would expect the day of today... Should I fill a bug-report on the tracker? Perhaps also for the missing space after \date[]? TIA, -- Peter ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] printing the current date
On Sun, Jan 10 2021, Fabrice L wrote: > For exemple: > > \date[][weekday,day,month,year] and \currenttime[h,{\,:\,},m] Sorry, I should have mentioned, that I use the latest version: context-2021.01.08 -- Peter ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] printing the current date
> Le 10 janv. 2021 à 13:23, Peter Münster a écrit : > > Hi, > > I would expect, that \currentdate prints the current date, but it does > not: > > --8<---cut here---start->8--- > \starttext > \date[d=1]% first day of this month, ok > > \date% again first day, last parameters are used, this is ok > > \currentdate% same as \date, but I would expect the day of today... > \stoptext > --8<---cut here---end--->8--- > > How could I print the current date please? For exemple: \date[][weekday,day,month,year] and \currenttime[h,{\,:\,},m] F. > > TIA for any hints, > -- > Peter > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] printing the current date
Hi, I would expect, that \currentdate prints the current date, but it does not: --8<---cut here---start->8--- \starttext \date[d=1]% first day of this month, ok \date% again first day, last parameters are used, this is ok \currentdate% same as \date, but I would expect the day of today... \stoptext --8<---cut here---end--->8--- How could I print the current date please? TIA for any hints, -- Peter ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___