Function Reference


Returns the ISO weekday number for a given date

#include <Date.au3>
_DateToDayOfWeekISO ( $iYear, $iMonth, $iDay )


$iYear A valid year in format YYYY
$iMonth A valid month in format MM
$iDay A valid day in format DD

Return Value

Success: the day of the Week Range is 1 to 7 where 1=Monday.
Failure: 0 and sets the @error flag to non-zero.
@error: 1 - Invalid Input Date


_DateAdd, _DateDayOfWeek, _DateDiff, _DateToDayOfWeek, _DayValueToDate


#include <Date.au3>
#include <MsgBoxConstants.au3>

; ISO week day number for a given date 1 = Monday - 7 = Sunday
Local $iWeekday = _DateToDayOfWeekISO(@YEAR, @MON, @MDAY)
; NOT equal to @WDAY
MsgBox($MB_SYSTEMMODAL, "", "Today's ISO week day number is: " & $iWeekday)