x <- year_day(2019, 101:105, 1, 20, 30)
get_day(x)
get_second(x)
# Cannot extract more precise components
y <- year_day(2019, 1)
try(get_hour(y))
# Cannot extract components that don't exist for this calendar
try(get_quarter(x))
Run the code above in your browser using DataLab