Learn R Programming

grattan (version 1.5.2.5)

is.fy: Convenience functions for dealing with financial years

Description

Convenience functions for dealing with financial years

Arguments

yr_ending

An integer representing a year.

fy.yr

A string suspected to be a financial year.

date

A string or date for which the financial year is desired. Note that yr2fy does not check its argument is an integer.

Value

For is.fy, a logical, whether its argument is a financial year. The following forms are allowed: 2012-13, 201213, 2012 13, only. For fy.year, yr2fy, and date2fy, the financial year. For the inverses, a numeric corresponding to the year.

Examples

Run this code
# NOT RUN {
is.fy("2012-13")
is.fy("2012-14")
yr2fy(2012)
fy2yr("2015-16")
date2fy("2014-08-09")
# }

Run the code above in your browser using DataLab