Function Reference


_DateToDayOfWeekISO

Returns the ISO weekday number for a given date

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

Parameters

$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

Remarks

None.

Related

_DateAdd(), _DateDayOfWeek(), _DateDiff(), _DateToDayOfWeek(), _DayValueToDate()

Example

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

; ISO Week day number for a given date 0=Monday - 6=Sunday
Local $iWeekday = _DateToDayOfWeekISO(@YEAR, @MON, @MDAY)
; NOT equal to @WDAY
MsgBox($MB_SYSTEMMODAL, "", "Todays ISO WeekdayNumber is: " & $iWeekday)