From 5124aaf1349c20580f1c476692c3f152df86fd48 Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Fri, 4 Oct 2024 14:02:05 -0500 Subject: [PATCH] Fix Elixir 1.17 Enum.slice/2 warning --- README.md | 2 +- lib/edtf/humanize/aggregate.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8dc2ab8..c25ed0b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ toolkit for Elixir. ## Compatibility ### EDTF / ISO 8601-2 -EDTF.js fully implements [EDTF](http://www.loc.gov/standards/datetime) +EDTF fully implements [EDTF](http://www.loc.gov/standards/datetime) levels 0, 1, and 2 as specified by ISO 8601-2 ## Installation diff --git a/lib/edtf/humanize/aggregate.ex b/lib/edtf/humanize/aggregate.ex index de9943a..2b41792 100644 --- a/lib/edtf/humanize/aggregate.ex +++ b/lib/edtf/humanize/aggregate.ex @@ -78,7 +78,7 @@ defmodule EDTF.Humanize.Aggregate do end defp make_list(items, trailing_join) do - [Enum.slice(items, 0..-2) |> Enum.join(", "), List.last(items)] + [Enum.slice(items, 0..-2//1) |> Enum.join(", "), List.last(items)] |> Enum.join(", #{trailing_join} ") end end