From: Harald O. <har...@el...> - 2024-07-31 16:32:09
|
TCL 8.6 clock format and friends have a clock seconds argument. The value for clock second for the current time may be returned by [clock seconds]. To format the current day/time, the following command may be used: % clock format [clock seconds] -format "%Y-%m-%d" 2024-07-31 TIP 688 addes the following shortcut for this for TCL8.7+: % clock format -now -format "%Y-%m-%d" 2024-07-31 With ticket https://core.tcl-lang.org/tcl/info/cd257619 the following form was added: % clock format now -format "%Y-%m-%d" 2024-07-31 The rationales for this: - It is not a positional parameter (what "-" suggests). It is a special value for a parameter. - 2 other commands use "now" in 8.6, none "-now" (free format date scan, Tk event generate) The value "-now" still works, but is undocumented and not tested. This change was added as an amendment to TIP 688: https://core.tcl-lang.org/tips/doc/trunk/tip/688.md I invite anybody to speak up now in case of objections. Thanks to Sergey, Ashok and Schelte to make this happen! Take care, Harald |