R/fct_download.R
format_duration.Rd
Converts a numeric number of seconds into a readable string such as "2 hours 13 minutes 51 seconds".
format_duration(seconds)
Numeric. Number of seconds to format.
Character string.
format_duration(7451) # "2 hours 4 minutes 11 seconds" #> [1] "2 hours 4 minutes 11 seconds" format_duration(30) # "30 seconds" #> [1] "30 seconds"