Next: Errors, Previous: Control Flow, Up: k9: Manual
k9 has functions (within .z
) to get the current date and time to various degrees of precision. There are also functions to retrieve partial date and time using dot notation.
z.d date 2001.02.03 z.t time 12:34:56.789 z.T datetime
These functions retrieve the date as day (d) or month (m) precision.
.z.d 2023.03.11
These functions retrieve the time millisecond precision.
z.t 09:09:02.451
One could use the current time commands to measure run time but typically this is done via \t
t1:z.t;(_2e8)?1.;t2:z.t;t2-t1 00:00:00.001 \t (_2e8)?1. 610
These functions retrieve the date and time as datetime.
.z.T 2023.03.11 09:09:49.654
These functions use dot notation to retrieve partial date and times.
now:.z.v;now 11:27:18.049558016 now.h 11 now.r 11:27 now.s 11:27:18 now.t 11:27:18.049 now.u 11:27:18.049558 now.v 11:27:18.049558016