Skip to contents

Minutes under an hour, such as 45 min, and hours from there, such as 1.5 h and 312 h, with one decimal under 100 hours. NA is a dash.

Usage

fmt_duration(minutes)

Arguments

minutes

Lengths of time, in minutes.

Value

A character vector.

Examples

rghcard:::fmt_duration(c(0.4, 45, 90, 18720, NA))
#> [1] "0 min"  "45 min" "1.5 h"  "312 h"  "–"