Turn strings in class hms into periods of time.

time_deci2period(x, unit = "hour", type = "hm")

Arguments

x

string of class lubridate::hms "HH:MM:SS"

unit

unit to convert to

type

hms or hm

Value

Period

Examples

time_deci2period(8.5)
#> [1] "08:30"
time_deci2period(1.25, "minute")
#> [1] "00:01"