Returns a number between 0 and 6 representing the day of the week in the provided datetime value {0}. This function takes ...

Returns a number between 0 and 6 representing the day of the week in the provided datetime value {0}. 
 This function takes an optional Day value, {1}, to set the first day of the week for this relative calculation. The default value firstDay is Day.Sunday. 
Valid values are: Day.Sunday, Day.Monday, Day.Tuesday, Day.Wednesday, Day.Thursday, Day.Friday, and Day.Saturday.
  
  • {0}: A date, datetime, or datetimezone value from which the day of the week is determined.
  • {1}: A Day type representing the first day of the week for this calculation.