tells me the week no in a year with start week day as Monday.
My question : I need dates that start with (say) week 10 and end with
week(14) of a given year.
How can I get this information from clock function ?
thanks for your help
using the new time scanning in Tcl 8.5, you need to specify the year,
week of year and day of week:
set wk10monday [clock scan {2008 1 10} -format {%G %w %V}]
set wk14friday [clock scan {2008 5 14} -format {%G %w %V}]
puts "starting [clock format $wk10monday]"
puts "ending [clock format $wk14friday]"
results in:
starting Mon Mar 03 00:00:00 EST 2008
ending Fri Apr 04 00:00:00 EDT 2008
See point [3] under http://www.tcl.tk/man/tcl8.5/TclCmd/clock.htm#M25
If you're using Tcl 8.4, get the clock extension from
http://sourceforge.net/project/showfiles.php?group_id=10894
(release notes: http://sourceforge.net/project/shownotes.php?release_id=505712)
--
Glenn Jackman
Write a wise saying and your name will live forever. -- Anonymous
Ah, I see points [4] and [5] say that you can use a 2-digit year or no
year at all. But you do need to specify the week of year and day of
week at minimum.