Add option to $dayOfWeek to choose between Monday and Sunday
Hi!
I was wondering if you could add an optional parameter to $dayOfWeek that allows you to choose on which day you want the functionality to start counting.
Thanks!
1
vote
![](https://secure.gravatar.com/avatar/ae238975a98cf041b89c4838783b44d5?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Wernfried commented
If you like to have Monday as first day of week, then simply use '$isoDayOfWeek'
https://www.mongodb.com/docs/v5.0/reference/operator/aggregation/isoDayOfWeek/