Sha256: 5e848b504d96772ca9a0f031875efc72e792d79c7d4f7559141424fb33cf3ff6
Contents?: true
Size: 331 Bytes
Versions: 69
Compression:
Stored size: 331 Bytes
Contents
defmodule Year do def leap_year?(year) do div4?(year) && div100?(year) == div400?(year) end defp divides?(dividend, divisor), do: rem(dividend, divisor) == 0 defp div4?(dividend), do: divides?(dividend, 4) defp div100?(dividend), do: divides?(dividend, 100) defp div400?(dividend), do: divides?(dividend, 400) end
Version data entries
69 entries across 69 versions & 1 rubygems