Minor optimisations and bug fix
Minor optimisations and bug fix

Date.now() was very occasionally giving a time slightly after endDate.
Math.ceil in millisecondsToDays would round this up, giving a
periodInDays of 91 instead of 90

sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile