Datetime.weekday read/write property



The Datetime.weekday property returns a number representing the day of the week. Valid values are from 1 through 7.

  1. Sunday
  2. Monday
  3. Tuesday
  4. Wednesday
  5. Thursday
  6. Friday
  7. Saturday
Setting the weekday property with a value lower or higher will throw an error.

Example

-- prints the current day of the week, for example "3" for Thursday print(sys.Datetime().weekday)