IsoWeek constructor

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

Creates $isoWeek operator expression

Returns the week number in ISO 8601 format, ranging from 1 to 53. Week numbers start at 1 with the week (Monday through Sunday) that contains the year’s first Thursday.

  • 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

IsoWeek(date, {timezone})
    : super('isoWeek', AEObject({'date': date, 'timezone': timezone}));