openinghours is an R package to read and write strings of opening hours to the half hour.
To install the developmental version from GitHub
# install.packages("remotes") remotes::install_github("poissonconsulting/openinghours")
library(openinghours) library(hms) # for printing of times library(tidyr) # to unnest list column x <- c("Store" = "9:00-17:00") data <- read_opening_hours(x) unnest(data, "OpeningHours") #> # A tibble: 1 x 4 #> Name String Open Close #> <chr> <chr> <time> <time> #> 1 Store 9:00-17:00 09:00 17:00
Please note that the openinghours project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.