Total number of weeks in year
![mikzielinski](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar22.png)
mikzielinski
Registered Posts: 3 ✭✭✭
Hi all,
How can I get a number of weeks in the year based on date?
Answers
-
Just to confirm I understand correctly. Are you looking for:
- The number of weeks in a year, given a year as a parameter? This would be equivalent to asking whether a year is a leap year.
- Given a date, compute the week within the year that that date falls on. This would return an integer.
Let me know!
-
I manage to get this,
From the date I got the current week number, then I created a fake date on last week of the year. After that, I subtracted them and got weeks until the end of year