fix a bug about last day.