Jump to content

Template:FY/doc

From Wikipedia, the free encyclopedia

Purpose

[edit]

This template has two functions:

  1. When given no parameters {{FY}}, it produces just the abbreviation FY
  2. When provided a year, it can display the fiscal year in a variety of formats.

Usage

[edit]

Default formatting

[edit]

|both= or |b= is a boolean value for whether both years should be displayed.

Markup Renders as
{{FY}}

FY

{{FY|2024}}

FY2023–24

{{FY|2024|both=yes}}

FY2023–24

{{FY|2024|b=y}}

FY2023–24

{{FY|2024|b=n}}

FY2024

Formatting methods

[edit]

By country

[edit]

When given a year and a country, it displays the fiscal year in country-specific style. Country codes are from ISO 3166-1 alpha-2 and are case-insensitive. Country-specific styles are based on the article Fiscal year. If you think changes should be made to the output style, please report it at Template talk:FY and consider editing Fiscal year.

Markup Renders as
{{FY|2024|c=au}}

FY2023/24

{{FY|2024|c=in}}

FY2023–24

{{FY|2024|c=us}}

FY2023–24

{{FY|2024|c=uk}}

FY2023–24

{{FY|2024|c=zw}}

FY2023–24

By digits

[edit]

|digits= or |d= specifies how many digits to display.

Markup Renders as
{{FY|2024|d=2}}

FY24

{{FY|2024|d=3}}

FY23–4

{{FY|2024|d=4}}

FY2024

{{FY|2024|d=4|b=y}}

FY23–24

{{FY|2024|d=4|b=n}}

FY2024

{{FY|2024|d=5}}

FY2023–4

{{FY|2024|d=6}}

FY2023–24

{{FY|2024|d=8}}

FY2023–2024

You can also specific a separator for multiple year listings with |separator= or |s=

Markup Renders as
{{FY|2024|d=3}}

FY23–4

{{FY|2024|d=3|s=-}}

FY23-4

{{FY|2024|d=3|s=/}}

FY23/4

{{FY|2024|d=5}}

FY2023–4

{{FY|2024|d=5|s=-}}

FY2023-4

{{FY|2024|d=5|s=/}}

FY2023/4

{{FY|2024|d=6}}

FY2023–24

{{FY|2024|d=6|s=-}}

FY2023-24

{{FY|2024|d=6|s=/}}

FY2023/24

{{FY|2024|d=8}}

FY2023–2024

{{FY|2024|d=8|s=-}}

FY2023-2024

{{FY|2024|d=8|s=/}}

FY2023/2024

TemplateData

[edit]
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:FY in articles based on its TemplateData.

TemplateData for FY

Display a fiscal year in various formats.
End year1
The year of the end date of the fiscal year.
Suggested values
  • 2010
  • 2011
  • 2012
  • 2013
  • 2014
  • 2015
  • 2016
  • 2017
  • 2018
  • 2019
  • 2020
  • 2021
  • 2022
  • 2023
  • 2024
  • 2025
  • 2026
Example
2024
Country codecountry
Suggested values
  • au
  • in
  • us
Display both years?both
b
Separatorseparator
s
When multiple years are shown, what character should be placed between them?
Suggested values
  • /
  • -
Default
-
Example
"/" or "-"
Digitsdigits
d
Number of digits to display
Suggested values
  • 2
  • 3
  • 4
  • 5
  • 6
  • 8
Default
6, unless both=yes, in which case 4