bitwalker / bitwalker/timex

`Timex.week_of_month` doesn't specify week start

Open
#791 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Elixir
Stars
1.8k
Forks
407
PR merge metrics
No merged PRs in 30d

Description

There's `Timex.weekday/1` that assumes an iso-week and `Timex.weekday/2` that allows you to specify the start of the week. I was surprised that `Timex.week_of_month` doesn't have a version that allows you to specify the start of the week. Also, the docs don't explicitly say that it's using a Monday week start (though it's typical to assume ISO8601 standards, it would still be good to explicitly state it).

Since there are functions that allow specifying different starts of the week, I think it makes sense that the docs at least specify which day of the week is used as the start for the calculation. Ideally there's a version that allows specifying the week start, though.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.