Fix week distance calculation

And accidentally redo what was already done on KDAB's branch
because I forgot to pull from there first... *sigh*