Skip to content

Commit

Permalink
fix: bug in beginning_of_month/2 guard
Browse files Browse the repository at this point in the history
Closes #696
  • Loading branch information
bitwalker committed Mar 24, 2023
1 parent 82063b3 commit 7f584ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/timex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1474,7 +1474,7 @@ defmodule Timex do
Same as beginning_of_month/1, except takes year and month as distinct arguments
"""
@spec beginning_of_month(Types.year(), Types.month()) :: Date.t() | {:error, term}
def beginning_of_month(year, month) when is_year(month) and is_month(month),
def beginning_of_month(year, month) when is_year(year) and is_month(month),
do: %Date{year: year, month: month, day: 1}

def beginning_of_month(_, _),
Expand Down

0 comments on commit 7f584ce

Please sign in to comment.