Jump to content

Template:Cite legislation UK/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
fix all the things. doc was a freaking nightmare to figure out from scratch. DOCUMENT YOUR DAMN CODE!
→‎See also: this sort of commentary does not belong here; bring it up on the talk page
Line 188: Line 188:
==See also==
==See also==
* {{tl|Ukhansard}}
* {{tl|Ukhansard}}
* {{tl|UK Parliament}}: Broken – Consider merging functionality.
* {{tl|UK Parliament}}
* {{tl|UK SI}}: Decent – May be useful as a module or to merge.
* {{tl|UK SI}}
* {{tl|ELI}}: Identifier in multiple European countries, but resolves differently in each.
* {{tl|ELI}}: Identifier in multiple European countries, but resolves differently in each.



Revision as of 14:59, 9 July 2022


Usage

A template to cite UK primary and secondary legislation, as provided by legislation.gov.uk. This is a straightforward wrapper of {{Citation}} (CS2 by default).

To do

  • Clean and sanitize. The doc was a nightmare to figure out.
  • Eventually move this to a proper CS1|2 module wrapper
  • ELI support

Implementation outline

Cite legislation UK:
{{Citation 
 |publisher=[[The National Archives (United Kingdom)|The National Archives]]
 |website=[[legislation.gov.uk]]
 |id= populated by:
    |type= "act" (default) or "si" 
    |year= ("1978" or "1948" if omitted)
    |chapter= (act only, "30" if omitted)
    |number= (si only, "1" if omitted)
    |section=
    |schedule= (set to "0" for a blank after "sch." text)
 |title= populated by:
    |type= "act" (default) or "si"
    |act= (act only, "Interpretation Act 1978" if omitted)
    |si= (si only, "The Statutory Instruments Regulations 1947" if omitted)
    |section= 
    |schedule=(set to "0" for a blank after "Sechedule" text)
 |url=
    |type=act: https://legislation.gov.uk/ukpga/{year}/{chapter}[/section/{section}]/enacted
    |type=si: https://legislation.gov.uk/uksi/{year}/{number}[/section/{section}][/schedule/{schedule}]/made
 |access-date=
 |date=
 |mode=
 |quote=
}}

UK Act of Parliament

{{Cite legislation UK |type=act |year= |chapter= |act= |section= |date= |accessdate= }}

The template defaults to the Interpretation Act 1978:

"Interpretation Act 1978", legislation.gov.uk, The National Archives, 1978 c. 30

UK Statutory Instrument

{{Cite legislation UK |type=si |year= |number= |si= |section= |date= |accessdate= }}

The template defaults to the Statutory Instruments Regulations 1947:

"The Statutory Instruments Regulations 1947", legislation.gov.uk, The National Archives, SI 1948/1

Examples

{{Cite legislation UK
   | type = si
   | si = The Equine Identification (England) (Amendment) (EU Exit) Regulations 2018
   | year = 2018
   | number = 1409
   | section = 2
   | schedule = 0
   | access-date=2022-07-08 
   | date= These Regulations come into force 21 days after the day on which they are made <!-- | made = 20 December 2018 | laid = 21 December 2018 | force = "These Regulations come into force 21 days after the day on which they are made" --> 
   | quote = test capitalization & punct.
 }} 

"The Equine Identification (England) (Amendment) (EU Exit) Regulations 2018: Section 2: Schedule", legislation.gov.uk, The National Archives, These Regulations come into force 21 days after the day on which they are made, SI 2018/1409 (s. 2)(sch.), retrieved 2022-07-08, test capitalization & punct {{citation}}: Check date values in: |date= (help)

{{Cite legislation UK
   | year = 2018
   | number = 1418 (W. 266)
   | section = 3
   | type = si
   | si = Gorchymyn Cefnffordd yr A40 a’r Ffordd Gyswllt (Cyffordd Travellers’ Rest, Sir Gaerfyrddin) (Gwahardd Cerbydau a Therfyn Cyflymder 30 MYA Dros Dro) 2018 [The A40 Trunk Road and Link Road (Travellers’ Rest Junction, Carmarthenshire) (Temporary Prohibition of Vehicles and 30 MPH Speed Limit) Order 2018]
   | date = 3 January 2019
   <!-- | made = 21 December 2018 | laid = | force = 3 January 2019 -->
   <!-- | url = https://www.legislation.gov.uk/wsi/2018/1418/contents/made/welsh -->
 }} 

(W. 266)/section/3/made "Gorchymyn Cefnffordd yr A40 a'r Ffordd Gyswllt (Cyffordd Travellers' Rest, Sir Gaerfyrddin) (Gwahardd Cerbydau a Therfyn Cyflymder 30 MYA Dros Dro) 2018 [The A40 Trunk Road and Link Road (Travellers' Rest Junction, Carmarthenshire) (Temporary Prohibition of Vehicles and 30 MPH Speed Limit) Order 2018]: Section 3", legislation.gov.uk, The National Archives, 3 January 2019, SI 2018/1418 (W. 266) (s. 3) {{citation}}: Check |url= value (help)

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

TemplateData for Cite legislation UK

Cite UK Acts of parliament, and UK statutory instruments
Typetype
'act' for Act or 'si' for Statutory Instrument
Default
act
Example
act
Chapterchapter
The chapter number of the act
Example
30
Sectionsection
The section number, if you would like to cite a particular section
Nameact
The full name of the Act
Example
Interpretation Act 1978
Numbernumber
The number of the SI
Example
1
SI namesi
The full name of the SI
Example
The Statutory Instrument Regulations 1947
Access Dateaccessdate
The date that legislation.gov.uk was accessed
yearyear
The year of the Act or SI
Example
1978
Datedate
The date the act was given Royal Assent or the SI was made
Example
20 July 1978
Scheduleschedule
The Schedule number, if you would like to cite a specific schedule; for acts with a single schedule, use '0'

Default value requires type


See also