Skip to contents

Returns the current year as a year vector, in the era system specified by era.

Usage

this_year(era = "CE")

Arguments

era

An era object or label understood by era(). Defaults to the Common Era (era("CE")).

Value

A yr vector with the current year.

See also

Other era helper functions: era_parameters, era_year_parameters, era_year, era, is_era_year(), is_era(), is_yr()

Examples

# This year in the Common Era
this_year()
#> # CE years <yr[1]>:
#> [1] 2023
#> # Era: Common Era (CE): Gregorian years (365.2425 days), counted forwards from 0
# This year in the Holocene Epoch
this_year("HE")
#> # HE years <yr[1]>:
#> [1] 12023
#> # Era: Holocene Era (HE): Gregorian years (365.2425 days), counted forwards from -10000