LGTM, I only question if we should also add isoyear = function(x) as.integer(format(as.IDate(x), "%G"))?
Since isoyear("2019-12-30") is 2020.
Originally posted by @ben-schwen in #7144 (comment)
This is a natural complement to isoweek(). As with isoweek(), we can quickly include a fast {base}-wrapped implementation, and try and improve it later.
Related: #2611.
LGTM, I only question if we should also add
isoyear = function(x) as.integer(format(as.IDate(x), "%G"))?Since
isoyear("2019-12-30")is2020.Originally posted by @ben-schwen in #7144 (comment)
This is a natural complement to
isoweek(). As withisoweek(), we can quickly include a fast {base}-wrapped implementation, and try and improve it later.Related: #2611.