lastMonth
Creates a last-month condition for date fields. Matches documents where the specified date field falls within last month's date range.
Return
A new last-month condition.
Parameters
field
The date field name to check.
datePattern
Optional date pattern for parsing/formatting. Can be String or DateTimeFormatter.