Fix scheduled publishing test

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