Friday the 13th

Published by Werdna in

Given the month and year as numbers, return whether that month contains a Friday 13th.

Examples

hasFriday13(3, 2020) ➞ true

hasFriday13(10, 2017) ➞ true

hasFriday13(1, 1985) ➞ false

Notes

  • January will be given as 1, February as 2, etc ...
  • Check Resources for some helpful tutorials on PHP's date module.
Watch a quick demo on how Edabit works.