Open mohammedzeglam-pg opened 2 days ago
This can be done with just a simple Group implementation. Something along the lines of:
defmodule UserWithATimeZone do
defstruct details: %{}, time_zone: "Etc/UTC"
end
defimpl FunWithFlags.Group, for: UserWithATimeZone do
def in?(%UserWithATimeZone{time_zone: time_zone}, time_zone), do: true
def in?(_user, _time_zone), do: false
end
Flags enabled and disabled based on time or timezone