Date math rounding error

I've come across a strange issue which I think is a bug in the date math

I create a daily snapshot of data once it is 10 days old using curator and the name of the snapshot is set to "name: <{now/d-10d{YYYY-MM-dd}}>"

This has been working fine until a few days ago when the name returned by the routine resolved to 2020 instead of 2021 for snapshots of data created this year.

Any suggestions ?

Date math changed a bit recently. Which version of Elasticsearch are you using?

Also, once you're past January 11, it will be impossible to replicate with the d-10d part.

On the contrary, the problem has been happening every day SINCE the 11th January

It appears that the problem is fixed by changing "name: <{now/d-10d{YYYY-MM-dd}}>" to "name: <{now/d-10d{yyyy-MM-dd}}>"