Current section
Files
Jump to
Current section
Files
lib/hassan.ex
defmodule Hassan do
@moduledoc """
Get Current UTC datetime.
"""
@doc """
This is the very first sciprt by me, Since I'm learning elixir these days,
I'm writing this test script to get current UTC datetime.
## Examples
iex> Hassan.dateTime()
"~U[2020-10-08 16:19:28.353000Z]"
iex> Hassan.date()
"{{2020, 10, 8}, {16, 46, 3}}"
"""
def dateTime do
DateTime.utc_now()
end
def date do
:calendar.universal_time()
end
end