weekday#

swordfish.function.weekday()#

eturn integer(s) to represent of the corresponding weekday(s) of X.

If startFromSunday=true, 0 means Sunday, 1 means Monday, …, and 6 means Saturday.

If startFromSunday=false, 0 means Monday, 1 means Tuesday, …, and 6 means Sunday.

Parameters:
  • X (Constant) – A temporal scalar/vector.

  • startFromSunday (Constant, optional) – A Boolean value indicating whether a week starts from Sunday, by default DFLT. If startFromSunday=false, a week starts from Monday.