So, the other day I ran into the need of knowing what week of the year a date was, using JavaScript, without installing any library, starting on Sundays. I wanted to share what we came up with, modifying this Stack Overflow post, in case it is of some use to someone. Hope it helps.