Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Long-year/Elixir/long-year.elixir
Normal file
9
Task/Long-year/Elixir/long-year.elixir
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
defmodule ISO do
|
||||
def long_year?(y) do
|
||||
{:ok, jan1} = Date.new(y,1,1)
|
||||
{:ok, dec31} = Date.new(y,12,31)
|
||||
Date.day_of_week(jan1) == 4 or Date.day_of_week(dec31) == 4
|
||||
end
|
||||
end
|
||||
|
||||
IO.inspect(Enum.filter(1990..2050, &ISO.long_year?/1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue