In MongoDB, the $year aggregation pipeline operator returns the year portion of a given date.
When using the $year operator, you can optionally specify a timezone to use for the result.
The $year 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.