Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 570 Bytes

README.md

File metadata and controls

31 lines (27 loc) · 570 Bytes

fyr - Fiscal Year R

Fiscal Year From Date: Returns an integer year from a date based on the starting month of the fiscal year

To Install:

install.packages("devtools")
devtools::install_github("michaelvalcic/fyr")

Syntax:

fy(fy_date, fy_start)

fy_date: Date in date format

fy_start: Must be an integer in range of 1 - 12 to represent the starting month of the fiscal year. The default is 7.

Example:

fy(as.Date("2019-06-01"),7)

Would return

2019

While

fy(as.Date("2019-07-01"),7)

Would return

2020