• on_year(): Is the date on year x?

  • before_year(): Is the date before year x?

  • after_year(): Is the date after year x?

  • between_years(): Is the date between years x and y?

Additionally, there are equivalent functions for ISO years and epidemilogical years.

after_year(x, inclusive = FALSE)

after_isoyear(x, inclusive = FALSE)

after_epiyear(x, inclusive = FALSE)

before_year(x, inclusive = FALSE)

before_isoyear(x, inclusive = FALSE)

before_epiyear(x, inclusive = FALSE)

between_years(x, y)

between_isoyears(x, y)

between_epiyears(x, y)

on_year(x)

on_isoyear(x)

on_epiyear(x)

Arguments

x

[integer(1)]

A year to mark as an event. For on_year(), this is also allowed to be a vector.

inclusive

[logical(1)]

Should x count as an event?

y

[integer(1)]

A year to mark as an event.