As a follow-up to my suggestion, here's an implementation example.
Script to calculate yesterday's date:
var today = APPLICATION.getInfo().dateNowInternalFormat;
SIMPLEDATE_1.initializeWithInternalDate(today);
var todayFormatted = SIMPLEDATE_1.format("DD.MM.YYYY");
SIMPLEDATE_1.rollDays(-1);
var yesterdayFormatted = SIMPLEDATE_1.format("DD.MM.YYYY");
TEXT_1.setText("Today is " + todayFormatted + ". Yesterday was " + yesterdayFormatted + ".");
Before calculation:
After calculation:

