sysGetDayOfWeek

Calculates the day of week for a given date (0=Sunday, 6=Saturday). Takes day (day of month 1-31), month (month 1-12), year (year number). Returns the day of the week for the specified date as an integer from 0 to 6.

System

Parameters & Returns

Parameters

day Int
month Int
year Int

Returns

Int

Quick Summary

Calculates the day of week for a given date (0=Sunday, 6=Saturday). Takes day (day of month 1-31), month (month 1-12), year (year number). Returns the day of the week for the specified date as an integer from 0 to 6.

Technical Exegesis...

Returns the day of the week for the specified date as an integer from 0 to 6, where 0 is Sunday, 1 is Monday, through 6 is Saturday. Uses Zeller's congruence algorithm to calculate the day of week for any valid Gregorian calendar date.

The algorithm adjusts January and February to be months 13 and 14 of the previous year for calculation purposes. Returns: 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday. Useful for calendar applications and date-based logic.

Example

Example.bam
; No example implemented yet