At last, the getDay function fixed

It now returns proper day.