Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR ELIXIR

elixir timex format

iex> Timex.format({2013,8,18}, "{YYYY}-{M}-{D}")
{:ok, "2013-8-18"}

iex> Timex.format({2013,8,18}, "%Y-%m-%d", :strftime)
{:ok, "2013-08-18"}

iex> Timex.format({2013,8,18}, format_str, MyApp.MyDateFormatter)

iex> Timex.format!({2013,8,18}, "%Y-%m-%d", :strftime)
"2013-08-18"
Source by hexdocs.pm #
 
PREVIOUS NEXT
Tagged: #elixir #timex #format
ADD COMMENT
Topic
Name
2+3 =