Date is weekend
Checks if the given date is a weekend.
- Use
datetime.datetime.weekday()
to get the day of the week as an integer. - Check if the day of the week is greater than
4
. - Omit the second argument,
d
, to use a default value ofdatetime.today()
.