Difference between revisions of "Template:FAA-document"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(create template based on Template:FAA-diagram, but for links to other documents where the URL changes every 28 days)
 
imported>Zyxw
(update: only output URL if 2nd parameter is not supplied)
Line 1: Line 1:
<span class="PDFlink">[http://aeronav.faa.gov/d-tpp/{{padleft:{{#expr:((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+364)/364)-0.5 round 0)+7}}|2}}{{padleft:{{#expr:((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+28)/28)-0.5 round 0)-(((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+364)/364)-0.5 round 0)-1)*13}}|2}}/{{{1}}}.PDF {{{2}}}]</span>&nbsp;<span style="font-size:smaller;">([[Portable Document Format|PDF]])</span>, effective {{#time:j M Y|{{JULIANDAY.TIMESTAMP|{{#expr:(((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+28)/28)-0.5 round 0)-1)*28+2454483}}}}}}<noinclude>
+
{{#if:{{{2|}}}|<span class="PDFlink">[}}http://aeronav.faa.gov/d-tpp/{{padleft:{{#expr:((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+364)/364)-0.5 round 0)+7}}|2}}{{padleft:{{#expr:((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+28)/28)-0.5 round 0)-(((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+364)/364)-0.5 round 0)-1)*13}}|2}}/{{{1}}}.PDF {{#if:{{{2|}}}|{{{2}}}]</span>&nbsp;<span style="font-size:smaller;">([[Portable Document Format|PDF]])</span>, effective {{#time:j M Y|{{JULIANDAY.TIMESTAMP|{{#expr:(((({{JULIANDAY|{{CURRENTYEAR}}|{{CURRENTMONTH}}|{{CURRENTDAY}}}}-2454483+28)/28)-0.5 round 0)-1)*28+2454483}}}}}}}}<noinclude>
 
----
 
----
 
{{documentation}}
 
{{documentation}}
 
<!-- Categories and interwikis can be found in the /doc subpage, don't add them here. -->
 
<!-- Categories and interwikis can be found in the /doc subpage, don't add them here. -->
 
</noinclude>
 
</noinclude>

Revision as of 10:01, 29 July 2012

http://aeronav.faa.gov/d-tpp/2510/{{{1}}}.PDF


Template documentation[view] [edit] [history] [purge]

This template generates an external link to a PDF document from the Federal Aviation Administration's (FAA) digital - Terminal Procedures Publication (d-TPP). These links change every 28 days and the template calculates the correct URL based on the current date.

Usage

URL only

Link with text and effective date

  • Usage: {{FAA-document|09122RC|RNAV (GPS)-C}}
  • Result: RNAV (GPS)-C (PDF), effective Error: Invalid time.

Parameters

1. (unnamed) – document file name as found in URL of the FAA's digital - Terminal Procedures Publication (d-TPP).

For a URL of http://aeronav.faa.gov/d-tpp/2510/09122RC.PDF, the value for the first parameter is 09122RC (exclude the .PDF).

2. (unnamed) – optional document title, displayed as text with the external link.

In the example above, the value for the second parameter is RNAV (GPS)-C.

Technical information

The FAA's digital - Terminal Procedures Publication (d-TPP) documents are part of the Aeronautical Information Publication (AIP) which is updated on a 28-day cycle as per the ICAO. This causes a change in the URL involving four numbers: the first two represent the year (09 for 2009, 10 for 2010) and the second two represent the current AIRAC cycle (01 through 13). This template uses the current date (presently 6 Sep 2025) to calculate the effective date and the matching four-digit cycle number. The following is a list of the current and upcoming cycle numbers and effective dates:

  • 2510 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2511 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2512 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2513 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2601 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2602 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2603 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2604 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2605 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2606 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2607 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2608 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.
  • 2609 – effective ERROR: INVALID TIME. to ERROR: INVALID TIME.

See also

External links