Daily Challenge (132 Part Series)
Friday 13th or Black Friday is considered as an unlucky day. Calculate how many unlucky days are in the given year.
Can you find the number of Friday 13th in the given year? Good luck!
Input: Year as an integer.
Output: Number of Black Fridays in the year as an integer.
unluckyDays(2015) == 3 unluckyDays(1986) == 1
Note: In Ruby years will start from 1593.
Want to propose a challenge for a future post? Email email@example.com with your suggestions!