Restructured to set Sunday as column 1
Fixed flaw in date calculation