The start of the time period. The startDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.
The end of the time period. The endDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.
The time measurement unit between the startDate and endDate. It is an expression that resolves to a string:
The timezone to carry out the operation.
Used when the unit is equal to week. Defaults to Sunday. The startOfWeek parameter is an expression that resolves to a case insensitive string:
Generated using TypeDoc
Returns the difference between two dates.
5.0
https://docs.mongodb.com/manual/reference/operator/aggregation/dateDiff/#mongodb-expression-exp.-dateDiff