When creating a schedule without a recurrence rule, the occurrence is in the sequence even if the start time passed to occurrences/2 is later than the start time passed to new/2.
iex> schedule = Cocktail.Schedule.new(~U[2025-02-10 00:00:00Z])
#Cocktail.Schedule<>
iex> schedule |> Cocktail.Schedule.occurrences |> Enum.take(1)
[~U[2025-02-10 00:00:00Z]]
iex> schedule |> Cocktail.Schedule.occurrences(~U[2025-02-15 00:00:00Z]) |> Enum.take(1)
[~U[2025-02-10 00:00:00Z]]
Expected result:
iex> schedule = Cocktail.Schedule.new(~U[2025-02-10 00:00:00Z])
#Cocktail.Schedule<>
iex> schedule |> Cocktail.Schedule.occurrences |> Enum.take(1)
[~U[2025-02-10 00:00:00Z]]
iex> schedule |> Cocktail.Schedule.occurrences(~U[2025-02-15 00:00:00Z]) |> Enum.take(1)
[]
When creating a schedule without a recurrence rule, the occurrence is in the sequence even if the start time passed to
occurrences/2is later than the start time passed tonew/2.Expected result: