day.cpp bugfix