DayOfMonth constructor

DayOfMonth(
  1. dynamic date, {
  2. dynamic timezone,
})

Creates $dayOfMonth operator expression

Returns the day of the month for a date as a number between 1 and 31.

  • date - The date to which the operator is applied. date must be a valid expression that resolves to a Date, a Timestamp, or an ObjectID.
  • {timezone} - Optional. The timezone of the operation result. {timezone} must be a valid expression that resolves to a string formatted as either an Olson Timezone Identifier or a UTC Offset. If no timezone is provided, the result is displayed in UTC.

Implementation

DayOfMonth(date, {timezone})
    : super('dayOfMonth', AEObject({'date': date, 'timezone': timezone}));