Converts an interval (unit: seconds) in to a human-readable format. It is also capable of converting the human readable format in to total number of seconds elapsed since 00:00:00 GMT, January 1, 1970.
Note: When converting from human readable to numerical $duration will treat 1wk, 1w, 1week and 1 week as the same value. It is also worth noting that months and years do not have a set valid so can not be converted.
- N is an optional parameter which specifies how $duration formats the time:
|2||do not include seconds in the result|
|3||return in the H:m:s format|
$duration(3665) ;returns 1hr 1min 5secs $duration(3665,2) ;returns 1hr 1min $duration(3665,3) ;returns 01:01:05
Time since a specific date
This command echos how much time has passed since the 10th February 1986.