<commit_before>defmodule MealTracker.Helper do
  alias MealTracker.Config

  def today do
    :calendar.local_time()
    |> NaiveDateTime.from_erl!()
    |> NaiveDateTime.to_date()
  end

  def today_path do
    Path.join(Config.root(), "#{Date.to_iso8601(today())}.md")
  end
end<commit_msg>:memo:<commit_after>defmodule MealTracker.Helper do
  @moduledoc """
  Utility functions that are useful throughout the app.
  """

  alias MealTracker.Config

  @doc """
  Gets today's date.

  ## Examples

  ```
  iex> MealTracker.Helper.today()
  ~D[2019-07-21]
  ```
  """
  @spec today() :: Date.t()
  def today do
    :calendar.local_time()
    |> NaiveDateTime.from_erl!()
    |> NaiveDateTime.to_date()
  end

  @doc """
  Gets the path to today's log file.

  ## Examples

  ```
  iex> MealTracker.Helper.today_path()
  "/Users/username/meal-tracker/2019-07-21.md"
  ```
  """
  @spec today_path() :: String.t()
  def today_path do
    Path.join(Config.root(), "#{Date.to_iso8601(today())}.md")
  end
end
{'fraction_non_alphanumeric': 0.16019900497512438, 'fraction_numerical': 0.023880597014925373, 'mean_word_length': 3.373913043478261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4196789', 'n_tokens_mistral': 401, 'n_tokens_neox': 367, 'n_words': 72}