You appear to be correct. The documentation is wrong, and the correct syntax is in fact {{date_expression|date:format}
.
Some background on this error: filters in Angular are implemented as basic functions, so you could imagine it as something like function date(date, format)
. However, when used as a filter, the first parameter is actually the value before the pipe. (in this case, data_expression
)
You should submit a pull request to improve this doc. Otherwise I will and I'll take the credit for finding the issue :)