Skip to content

Instantly share code, notes, and snippets.

@ardeshireshghi
Created June 10, 2020 23:20
Show Gist options
  • Save ardeshireshghi/f206ca9f929ee7dfd315b358c1e10634 to your computer and use it in GitHub Desktop.
Save ardeshireshghi/f206ca9f929ee7dfd315b358c1e10634 to your computer and use it in GitHub Desktop.
const numberofDaysAllMonths = (year = new Date().getFullYear()) =>
[...Array(12)].map((_, month) => new Date(year, month + 1, 0).getDate())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment