Skip to contents

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

Usage

format_ay(year)

Arguments

year

Academic year, a single value or a vector

Value

Character vector of formatted academic years

Details

It accepts both numerical and character arguments.

Examples

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