fix datePeriod logic

in order to prevent clutter on the time axis, I have added some logic to
detect how many labels would have to be drawn on the time axis. The
logic was flawed in two ways:

1. the comparison to the width still allowed too many labels
2. weeks would never get applied

this commit fixes both issues.