Hi,
I added the patch but the output is not that expected because I get d = 4m
= 02 y = 2019 instead of "4 février 2019"
Thank you
Fabrice
\mainlanguage[fr]
\setupbackgrounds
[header]
[text]
[frame=off,
topframe=off,
bottomframe=on,
framecolor=,
rulethickness=1pt]
\defineframed
[headerframed]
[frame=off,
height=fit,
width=fit]
\startsetups [headertext]
\setupheadertexts
[{
\startframed [headerframed] [foregroundstyle=bold]
\getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
\stopframed
}]
\setupheadertexts
[{
\startframed [headerframed]
[align=flushleft,foregroundstyle=\ssx]
\getvariable{headertext}{location}\\
\getvariable{headertext}{time}
\stopframed
}]
[{
\startframed [headerframed]
[align=flushright,foregroundstyle=\ssx]
Lycée LA SALLE\\
\date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},y=\getvariable{headertext}{year}]
\stopframed
}]
\stopsetups
\setvariable{headertext}{set}{\directsetup{headertext}}
\setvariables
[headertext]
[title={Interrogation écrite},
number={6},
day={4},
month={02},
year={2019},
location={Seconde GTE},
time={55 minutes}]
\starttext
\input Knuth
\stoptext
Le dim. 27 janv. 2019 à 17:54, Otared Kavian
On 27 Jan 2019, at 17:30, Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> wrote:
[…] 1. You don’t have to remake the format for patches in cont-new.mkiv because the file is loaded at runtime.
2. The patch works and I get “2019 januari 27” with your example.
Hi Wolfgang,
Thanks for the clarification about cont-new.mkiv. The corrected cont-new.mkiv begins with
\unprotect
\def\syst_converters_check_date {\edef\temp{\systemparameter\c!d}\scratchcounterone \ifx\temp\empty\normalday \else\temp\fi \edef\temp{\systemparameter\c!m}\scratchcountertwo \ifx\temp\empty\normalmonth\else\temp\fi \edef\temp{\systemparameter\c!y}\scratchcounterthree\ifx\temp\empty\normalyear \else\temp\fi}
\writestatus\m!system{beware: some patches loaded from cont-new.mkiv}
However I still get the wrong date with the example I sent, and Fabrice's example with \mainlanguage[fr], as well as with \mainlanguage[nl], gives an incorrect result (even though the result is correct with \mainlanguage[en]).
Best regards: OK
___________________________________________________________________________________ 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
___________________________________________________________________________________