In MongoDB, the $isoDayOfWeek aggregation pipeline operator returns the weekday number in ISO 8601 format, ranging from 1 (for Monday) to 7 (for Sunday).
You can optionally specify a timezone to use for the result.
The $isoDayOfWeek operator accepts either a date (as either a Date, a Timestamp, or an ObjectId), or a document that specifies the date and timezone to use.