<commit_before>defmodule Date.Range do
  @moduledoc """
  Returns an inclusive range between dates.

  Ranges must be created with the `Date.range/2` function.

  The following fields are public:

    * `:first` - the initial date on the range
    * `:last` - the last date on the range

  The remaining fields are private and should not be accessed.
  """

  @type t :: %__MODULE__{first: Date.t, last: Date.t,
                         first_in_iso_days: Calendar.days,
                         last_in_iso_days: Calendar.days}

  defstruct [:first, :last, :first_in_iso_days, :last_in_iso_days]

  defimpl Enumerable do
    def member?(%{first: %{calendar: calendar, year: first_year, month: first_month, day: first_day},
                  last: %{calendar: calendar, year: last_year, month: last_month, day: last_day},
                  first_in_iso_days: first_in_iso_days, last_in_iso_days: last_in_iso_days},
                %Date{calendar: calendar, year: year, month: month, day: day}) do
      first = {first_year, first_month, first_day}
      last = {last_year, last_month, last_day}
      date = {year, month, day}

      if first_in_iso_days <= last_in_iso_days do
        {:ok, date >= first and date <= last}<commit_msg>Fix Date.Range.t (#6496)<commit_after>defmodule Date.Range do
  @moduledoc """
  Returns an inclusive range between dates.

  Ranges must be created with the `Date.range/2` function.

  The following fields are public:

    * `:first` - the initial date on the range
    * `:last` - the last date on the range

  The remaining fields are private and should not be accessed.
  """

  @type t :: %__MODULE__{first: Date.t, last: Date.t,
                         first_in_iso_days: Calendar.iso_days,
                         last_in_iso_days: Calendar.iso_days}

  defstruct [:first, :last, :first_in_iso_days, :last_in_iso_days]

  defimpl Enumerable do
    def member?(%{first: %{calendar: calendar, year: first_year, month: first_month, day: first_day},
                  last: %{calendar: calendar, year: last_year, month: last_month, day: last_day},
                  first_in_iso_days: first_in_iso_days, last_in_iso_days: last_in_iso_days},
                %Date{calendar: calendar, year: year, month: month, day: day}) do
      first = {first_year, first_month, first_day}
      last = {last_year, last_month, last_day}
      date = {year, month, day}

      if first_in_iso_days <= last_in_iso_days do
        {:ok, date >= first and date <= last}
{'fraction_non_alphanumeric': 0.10164724789071916, 'fraction_numerical': 0.0024106066693451184, 'mean_word_length': 2.921259842519685, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7042753', 'n_tokens_mistral': 815, 'n_tokens_neox': 771, 'n_words': 239}