Template:Get Academic Year

From Broadcast for Schools.co.uk.co.uk
Jump to: navigation, search
{{Get Academic Year | date=<date> | showspan=<y/n> }}

Gets the (British) academic year start point for a particular date. Assumes that an academic year runs from September to August. {{Get Academic Year|2011-04-24}} would return 2010, and {{Get Academic Year|2011-09-24}} would return 2011.

If only a year is entered an not a full date, then it assumes that the academic year is the one ENDING in the stated year, since it is more likely that an end date will be given as a year only than a first run from date. {{Get Academic Year|2011}} would return 2010, and {{Get Academic Year|2010}} would return 2009.

It normally returns a 4-digit number. If showspan=y then a string giving the span will be returned (2010-2011). If showspan is anything else or omitted then only the starting year will be returned (2010).