joeroe / era

R package for year-based time scales

Home Page:https://era.joeroe.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should epoch parameter of eras also have an era?

joeroe opened this issue · comments

Currently era() assumes the epoch parameter is a year in the Common Era, but we could make this itself a yr object (defaulting to CE).

If this is implemented we would have to change the hard-coded length of a year in yr_transform() to calls to era_year_days(era_unit(era(era_epoch())). But I'm no longer sure about this. The benefit seems marginal, it will probably introduce some recursion issues, and will definitely introduce more complexity for users when defining eras.