Returns the name of the weekday, based on the specified day
#include <Date.au3>
_DateDayOfWeek ( $iDayNum [, $iFormat = 0] )
$iDayNum | Day number 1 = Sunday 2 = Monday 3 = Tuesday 4 = Wednesday 5 = Thursday 6 = Friday 7 = Saturday |
$iFormat | [optional] Format: $DMW_LOCALE_USER (0) - Long name of the weekday (Default) $DMW_SHORTNAME (1) - Short name of the weekday e.g. Mon $DMW_LOCALE_LONGNAME (2) - Long name of the weekday in the user's default language $DMW_LOCALE_SHORTNAME (3) - Short name of the weekday in the user's default language |
Success: | Weekday name |
Failure: | An empty string and sets @error to non-zero |
@error: | 1 - Invalid weekday number. |
The function returns weekday names in English or the user's default language.
_DateDaysInMonth, _DateToDayOfWeek, _DateToDayOfWeekISO
#include <Date.au3>
#include <MsgBoxConstants.au3>
; Retrieve the long name
Local $sLongDayName = _DateDayOfWeek(@WDAY)
; Retrieve the abbreviated name
Local $sShortDayName = _DateDayOfWeek(@WDAY, $DMW_SHORTNAME)
MsgBox($MB_SYSTEMMODAL, "Day of Week", "Today is: " & $sLongDayName & " (" & $sShortDayName & ")")