Version 0 of Quick Access to Formatted Date & Time

Updated 2006-02-11 15:26:06

WJG (11/02/06) Just one of those handy code snippets that can be appended to a bag of support procs.

 #---------------
 # lazy way to get preformated time and date
 #---------------
 proc _date { {i date} } {
  switch -- $i {
    d&t   { set f "%c"}
    year  { set f "%H/%M/%S" }
    week  { set f "%W" }
    day   { set f "%A" }
    month { set f "%B"}
    time  { set f "%H/%M/%S" }
    date  { set f "%d/%m/%y" }
  }
  return [clock format [clock seconds] -format "$f"]
 }