xowf::test_item::Answer_manager method pretty_period (protected)

 <instance of xowf::test_item::Answer_manager[i]> pretty_period \
    [ -dayfmt dayfmt ] [ -timefmt timefmt ] from to

Defined in packages/xowf/tcl/test-item-procs.tcl

Switches:
-dayfmt (optional, defaults to "%q")
-timefmt (optional, defaults to "%H:%M")
Parameters:
from (required)
to (required)

Testcases:
No testcase defined.
Source code:
set from_day [lc_time_fmt $from $dayfmt]
set from_time [lc_time_fmt $from $timefmt]
if {$to ne ""} {
  set to_day [lc_time_fmt $to $dayfmt]
  set to_time [lc_time_fmt $to $timefmt]
} else {
  set to_day ""
  set to_time ""
}
if {$to_day eq ""} {
  set period "$from_day$from_time -"
} elseif {$from_day eq $to_day} {
  set period "$from_day$from_time - $to_time"
} else {
  set period "$from_day$from_time - $to_day$to_time"
}
return $period
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: