Fix scheduled publishing test

the test was not taking into account last date
of the month, so was selecting an invalid date
for scheduling and hence failing.