$month
Returns the month from the input date.
Options¶
date(required) Input date.type(optional) The output display type (NUMERIC,LONG_TEXTorSHORT_TEXT). DefaultNUMERIC.locale(optional) The display locale. Defaults toLocale.getDefault().
Example¶
{
"someDate": "$dt",
"num": {
"$month": "${someDate}"
},
"text": {
"$month": {
"date": "${someDate}",
"type": "LONG_TEXT",
"locale": {
"language": "de",
"country": "DE"
}
}
}
}
{
"someDate": ISODate("1990-06-05T16:08:39.137Z"),
"num": 6,
"text": "Juni"
}