The end of the time period. The endDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.
The start of the time period. The startDate can be any expression that resolves to a Date, a Timestamp, or an ObjectID.
Optional
startUsed when the unit is equal to week. Defaults to Sunday. The startOfWeek parameter is an expression that resolves to a case insensitive string:
Optional
timezone?: tzExpressionThe timezone to carry out the operation.
The time measurement unit between the startDate and endDate. It is an expression that resolves to a string:
Generated using TypeDoc
Returns the difference between two dates.