Function for weeks from a date
Refactoring to DRY up some pipes