@@ -471,8 +471,8 @@ defmodule Shared.Month do
471471 iex> Month.range(@third_month_of_2018, @third_month_of_2019)
472472 %Shared.Month.Range{direction: :forward, size: 13, start: ~m[2018-03]}
473473 """
474- @ spec range ( t ( ) , t ( ) ) :: Month.Range . t ( )
475- defdelegate range ( start , stop ) , to: Shared.Month.Range , as: :new
474+ @ spec range ( t ( ) , t ( ) | pos_integer ( ) ) :: Month.Range . t ( )
475+ defdelegate range ( start , stop_or_size ) , to: Shared.Month.Range , as: :new
476476
477477 @ doc """
478478 Creates a range of months from start to stop in the given direction.
@@ -482,8 +482,8 @@ defmodule Shared.Month do
482482 iex> Month.range(@third_month_of_2019, @third_month_of_2018, :backward)
483483 %Shared.Month.Range{direction: :backward, size: 13, start: ~m[2019-03]}
484484 """
485- @ spec range ( t ( ) , t ( ) , Shared.Month.Range . direction ( ) ) :: Shared.Month.Range . t ( )
486- defdelegate range ( start , stop , direction ) , to: Shared.Month.Range , as: :new
485+ @ spec range ( t ( ) , t ( ) | pos_integer ( ) , Shared.Month.Range . direction ( ) ) :: Shared.Month.Range . t ( )
486+ defdelegate range ( start , stop_or_size , direction ) , to: Shared.Month.Range , as: :new
487487
488488 @ doc ~S"""
489489 ## Examples
0 commit comments