Fulib v0.1.4 Fulib.DateTime View Source
Link to this section Summary
Link to this section Functions
Link to this function
eq?(a, b) View Source
Link to this function
format!(datetime) View Source
时间日期的格式化话
opts
* timezone
- :original
* :locale
* format
- :gmt
- :long eg: 2017-03-10 09:38:30 默认
- :utc_strftime eg: 2017-03-10T01:38:12Z
- :short eg: 2017-03-10 09:39
- :utc_iso8601 eg: 2017-03-10T01:46:27.860643+00:00
- :date eg: 2017-03-10
- :date_short eg: 2017-3-10
- :diff
_ :human
* overflow_format
- :date
Link to this function
format!(datetime, opts) View Source
Link to this function
format!(datetime, format, opts) View Source
Link to this function
format_diff!(datetime, opts \\ []) View Source
Link to this function
format_human!(datetime, opts \\ []) View Source
Link to this function
get_zone_time(datetime, timezone \\ "Asia/Shanghai") View Source
Link to this function
gt?(a, b) View Source
Link to this function
gt_or_eq?(a, b) View Source
Link to this function
lt?(a, b) View Source
Link to this function
lt_or_eq?(a, b) View Source
Link to this function
naive_now(timezone \\ "Asia/Shanghai") View Source
Link to this function
now(timezone \\ "Asia/Shanghai") View Source
Link to this function
range(date_range) View Source
Link to this function
range(begin_shift, end_shift) View Source
得到某一时间范围
Examples
iex> range(:today)
{~N[2018-07-25 00:00:00], ~N[2018-07-26 00:00:00]}
iex> range(4)
{~N[2018-07-22 00:00:00], ~N[2018-07-26 00:00:00]}
iex> range(nil)
{nil, nil}
Link to this function