Skip to contents

This function formats financial year variables for reporting purposes. It will convert an year input from 201516 format to 2015-16 format.

Usage

format_fy(year)

Arguments

year

Financial year, a single value or a vector

Value

Character vector of formatted financial years

Details

It accepts both numerical and character arguments.

Examples

format_fy(201617)
#> [1] "2016-17"
format_fy("201617")
#> [1] "2016-17"
format_fy(c(201617, 201718))
#> [1] "2016-17" "2017-18"