# Hour precision
x <- year_month_day(2019, 2:4, 5, 6)
x
# Compute the start of the month
calendar_start(x, "month")
# Or the end of the month, notice that the hour value is adjusted as well
calendar_end(x, "month")
Run the code above in your browser using DataLab