date_end_of_month
Retrieves a date that is the end of a month.
Example
1
2
3
4
| {{ '2025-01' | date_end_of_month }} => 2025-01-31
{{ '202501' | date_end_of_month }} => 2025-01-31
{{ 1 | date_end_of_month: 2025 }} => 2025-01-31
{{ 1 | date_end_of_month }} => 2025-01-31
|
Type |
Parameter |
Description |
Required |
string |
monthNum |
The month number starting from 1 = december or a string starting with year and ending with two digits representing the month. Comes before the | sign. |
Required |
string |
year |
The year, defaults to the current year |
|
string |
lastDayOfWeek |
The last day of the week, defaults to Sunday |
|
Output
Type |
Description |
string |
The date that is the end of the month |