Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
mayel committed Dec 21, 2024
1 parent 59fa012 commit 6855ce6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/dates_times.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ defmodule Bonfire.Common.DatesTimes do
## Examples
> format(DateTime.now!("Etc/UTC"))
"Jul 25, 2024, 11:08:21 AM"
"Jul 25, 2024"
iex> format("2024-07-25")
"Jul 25, 2024"
iex> format("2024-7-25")
"Jul 25, 2024"
iex> format("2024-7")
"Jul, 2024" # TODO
"""
def format_date(date, opts \\ []) do
case to_date(date) |> debug("format_date") do
Expand Down

0 comments on commit 6855ce6

Please sign in to comment.