The last calculation uses filter syntax to calculate the number of days in the current month.
The first filter run says “if it is a leap year and the current month is February, then there are 29 days this month”
The second filter run says, “otherwise, split a space-separated list of days-per-month into individual values, and use the value for the current month”
Then, when setting the “end” field value, {{{ [<now "YYYY-0MM-">addsuffix<last>] }}} constructs the date string by appending the calculated “last day” value to the current “year-month-”