Skip to content

$dayOfWeek

Returns the day of the week from the input date.

Options

  • date (required) Input date.
  • type (optional) The output display type (NUMERIC, LONG_TEXT or SHORT_TEXT). Default NUMERIC.
  • locale (optional) The display locale. Defaults to Locale.getDefault().

Example

{
    "someDate": "$dt",
    "number": {
        "$dayOfWeek": "${someDate}"
    },
    "text": {
        "$dayOfWeek": {
            "date": "${someDate}",
            "type": "LONG_TEXT",
            "locale": {
                "language": "de",
                "country": "DE"
            }
        }
    }
}
{
    "someDate": { "$date": "1998-01-05T14:55:17.17Z" },
    "number": 1,
    "text": "Montag"
}