# Check if a date is within the epidemiological season
epi_calendar(as.Date("2023-09-15"), start = 40, end = 20)
# Expected output: "2022/2023"
epi_calendar(as.Date("2023-05-01"), start = 40, end = 20)
# Expected output: "out_of_season"
epi_calendar(as.Date("2023-01-15"), start = 40, end = 20)
# Expected output: "2022/2023"
epi_calendar(as.Date("2023-12-01"), start = 40, end = 20)
# Expected output: "2023/2024"
Run the code above in your browser using DataLab