timex
timex copied to clipboard
Signature for Types.week_of_month doesn't cover all posibilities
Steps to reproduce
Under certain circumstances there can be up to 6 distinct weeks in a month (like January of 2022), but the type representing the week number is defined as 1..5
.
iex> Timex.week_of_month(2022,1,31)
6
January 2022 Calendar:
week Su Mo Tu We Th Fr Sa
1 01
2 02 03 04 05 06 07 08
3 09 10 11 12 13 14 15
4 16 17 18 19 20 21 22
5 23 24 25 26 27 28 29
6 30 31
Description of issue
Type definition found here
@type week_of_month :: 1..5
Incorrect linter warning about 6 being an invalid case:
