Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Day Of Week...Microsoft vs. TCC

Aug
1,917
68
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:
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
 
Code:
echo %@isodowi[%_isodate]
5

Joe
 
Yes, _isodowi returns 5.

Joe
 
Back
Top