Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signature for Types.week_of_month doesn't cover all posibilities #703

Open
tayjohno opened this issue Jan 25, 2022 · 0 comments
Open

Signature for Types.week_of_month doesn't cover all posibilities #703

tayjohno opened this issue Jan 25, 2022 · 0 comments

Comments

@tayjohno
Copy link
Contributor

tayjohno commented Jan 25, 2022

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:

Screen Shot 2022-01-24 at 9 07 59 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant