Skip to content

Add isoyear #7154

@MichaelChirico

Description

@MichaelChirico

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions