How to? Can anybody explain what @isowyear does please?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Feb 26, 2013
100
0
#1
The help for @isowyear says

Returns the ISO8601 numeric week date year.

which I must confess I don't understand. I thought I'd try it out and try to understand it from its output, but I can't work out what's going on here (note that my date format is set to DD/MM/YY):

d:\>ver /r

TCC 15.00.23 x64 Windows 7 [Version 6.1.7601]
TCC Build 23 Windows 7 Build 7601 Service Pack 1

d:\>echo %@isowyear[01/02/03]
2001

d:\>echo %@isowyear[01/02/06]
2001

d:\>echo %@isowyear[12/12/01]
2012

d:\>echo %@isowyear[11/11/24]
2011

d:\>echo %@isowyear[12/01/01]
2011


Can anyone clarify what the function does?

Thanks

Dan
 
Feb 26, 2013
100
0
#3
If you look at the other ISO date related and the try the following, I guess it will make sense:

echo %@isowyear[2014-01-01]
echo %@isowyear[2013-12-31]
echo %@isowyear[2013-12-30]
echo %@isowyear[2013-12-29]
It seems to be expecting a date formatted as YYYY-MM-DD.
Ah, OK. So if a date early in January of <YEAR> is in ISO week 52/53 of <YEAR - 1> it returns <YEAR -1>.

Think I get it, thanks.

Dan