Implement bug fix for counting weeks & days

Bug fix for https://trello.com/c/upgO39t3/83-completed-cohort-keeps-counting-weeks-and-days
@skurilyak 
Please revisit this. It's very verbose and seems like a lot of logic/code to accomplish something not-that-large