I found that datenext is not working properly using monthly data. For example, while the first command below gives the correct result on my comupter, the command below does not. I was able to reproduce this on other computers as well: