Fix #3: 'getDay' method does not exist

Did not check the output of the .setTime() which converted to timestamp instead of preserving as a Datetime object. This has now neen amended as a assign the  var as I did before but wrap the calculation within a new Date() object.