LowEndInsight v0.4.1 TimeHelper View Source
Collection of functions for handling time-based conversions.
Link to this section Summary
Functions
get_commit_delta/1: returns the time between now and the last commit in seconds
sec_to_days/1: returns a roll-up of days from a number of secs
sec_to_str/1: returns a string breakdown of total seconds into weeks, days, hours, minutes and remaining seconds.
sec_to_weeks/1: returns a roll-up of weeks from a number of secs
sum_ts_diff/1
sum_ts_diff/2
Link to this section Functions
get_commit_delta/1: returns the time between now and the last commit in seconds
sec_to_days/1: returns a roll-up of days from a number of secs
sec_to_str/1: returns a string breakdown of total seconds into weeks, days, hours, minutes and remaining seconds.
Examples
iex> TimeHelper.sec_to_str(5211)
"1 hr, 26 min, 51 sec"
sec_to_weeks/1: returns a roll-up of weeks from a number of secs
sum_ts_diff/1
sum_ts_diff/2