Skip to content

Commit 7f584ce

Browse files
committed
fix: bug in beginning_of_month/2 guard
Closes #696
1 parent 82063b3 commit 7f584ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/timex.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ defmodule Timex do
14741474
Same as beginning_of_month/1, except takes year and month as distinct arguments
14751475
"""
14761476
@spec beginning_of_month(Types.year(), Types.month()) :: Date.t() | {:error, term}
1477-
def beginning_of_month(year, month) when is_year(month) and is_month(month),
1477+
def beginning_of_month(year, month) when is_year(year) and is_month(month),
14781478
do: %Date{year: year, month: month, day: 1}
14791479

14801480
def beginning_of_month(_, _),

0 commit comments

Comments
 (0)