On 6/10/2025 2:35 AM, Benjamin Buchmuller wrote:
Hi list,

I was wondering if there is a "\time" equivalent similar to "\currentdate" -> 
"\date"?

I know from the wiki (and source) that there is "\currenttime", but "\time[h=8, m=30]" 
will not typeset "8:30", so it doesn't seem to be implemented. I understand that such an 
implementation might become arbitrarily complicated …

In fact, I'm trying to typeset durations like "3:30 min" which is not exactly a 
"time" either, but neither \unit{3:30 minute} nor a math formula achieve the expected 
rendering. Of course, one could just type it plainly, but maybe this little gap is worthwhile 
considering in a future version. :-)

%D A (simple) time formatter:
%D
%D \starttyping
%D time         : \the\time
%D time current : \time[method=current] % hh:mm:ss
%D time start   : \time[method=start]   % hh:mm:ss   startup time
%D time here    : \time[method=here]    % hh:mm:ss   time since startup
%D time m       : \time[m=100]          % hh:mm
%D time s       : \time[s=3661]         % hh:mm:ss
%D \stoptyping

So a few more times as we had these available anyway. In next upload but then you need to wikify it pending setups,

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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to