fix lastday and nextday bug