In MongoDB, the $dayOfMonth aggregation pipeline operator returns the day of the month for a date as a number between 1 and 31.
You can optionally specify a timezone to use for the result.
The $dayOfMonth 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.