Day Of Week...Microsoft vs. TCC

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
It would appear that TCC and Microsoft differ on how they return the day of the week as an integer.

TCC has Sunday=1, while Microsoft has Sunday=0

Thus, as today is Friday, TCC has Friday=6, while Microsoft has Friday=5

I discovered this while using the wmic command.
Code:
wmic path win32_localtime
Day  DayOfWeek  Hour  Milliseconds  Minute  Month  Quarter  Second  WeekInMonth  Year
7    5          8                   1       7      3        54      2            2017
Thus;
Code:
echo %@execstr[1,wmic path win32_localtime get DayOfWeek]
returns the Microsoft Day Of The Week.

Here is the link to the Win32_LocalTime Documentation.

According to ISO 8601, Monday is the first day of the week. It is followed by Tuesday, Wednesday, Thursday, Friday, and Saturday. Sunday is the 7th and final day.

Although this is the international standard, several countries, including the United States, Canada, and Australia consider Sunday as the start of the week.

This is not a bug, just something that I discovered, and am passing along.

Joe
 
Last edited:
May 20, 2009
218
0
53
ITALY
#2
Using the example that I find in the manual for ISODOWI, I get a strange result.
Code:
[C:\Program Files\JPSoft\TCMD21]echo %_date
07/07/17

[C:\Program Files\JPSoft\TCMD21]echo %@isodowi[%_date]
2

[C:\Program Files\JPSoft\TCMD21]
Regards

Rodolfo Giovanninetti