How to calculate old date from today by subtracting given years, months, days in logstash?

I answered how to do that using DateTime methods like prev_month on SO here.