I created these text boxes in a new, empty file, without any script and no variables. This is all there is, in the content of Main tab:
SET TimeFormat='h:mm:ss TT';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
After I posted the content of tab Main I realized the value of [Set BrokenWeeks] might cause the problem. After I changed the value of [Set BrokenWeeks] to 0 the output of Week() is correct, according to ISO 8601.
For future reference, these are the settings:
Set BrokenWeeks=0; //(use unbroken weeks)
Set BrokenWeeks=1; //(use broken weeks)
swuehl thanks for replying.