Difference between revisions of "Template:Cospar"
Jump to navigation
Jump to search
imported>GreenC (URL change) |
imported>Paine Ellsworth (per edit request on talk page) |
||
| Line 1: | Line 1: | ||
| − | {{#if:{{{id|{{{1|}}}}}}|{{nowrap|1=[https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id={{{id|{{{1|}}}}}} {{{name|{{{2|{{{id|{{{1|}}}}}}}}}}}}]}}}}<noinclude> | + | {{#if:{{{id|{{{1|}}}}}}|{{nowrap|1=[https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id={{{id|{{{1|}}}}}} {{{name|{{{2|{{{id|{{{1|}}}}}}}}}}}}]}} {{#if: {{{noval|}}} |
| − | + | | | |
| + | |{{#ifeq: {{str index|{{{id|{{{1|}}}}}}|5}}|- | ||
| + | |{{#ifexpr: | ||
| + | 1957 <= {{trunc|{{{id|{{{1|}}}}}}|4}} | ||
| + | and {{trunc|{{{id|{{{1|}}}}}}|4}} <= {{CURRENTYEAR}} | ||
| + | | | ||
| + | |{{error-small|COSPAR ID year must be between 1957 and {{CURRENTYEAR}}}}{{#if: {{{demo|}}}||[[Category:Pages with COSPAR ID errors]]}} | ||
| + | }} | ||
| + | {{#ifexpr: | ||
| + | ({{str number|{{str sub new|{{{id|{{{1|}}}}}}|6}}}} = 3) | ||
| + | and (0 < {{str letter|{{str sub new|{{{id|{{{1|}}}}}}|9}}}}) | ||
| + | and ({{str letter|{{str sub new|{{{id|{{{1|}}}}}}|9}}}} <= 3) | ||
| + | | | ||
| + | |{{error-small|COSPAR ID does not match expected format}}{{#if: {{{demo|}}}||[[Category:Pages with COSPAR ID errors]]}} | ||
| + | }} | ||
| + | |<!--skip validation in case of TLE format--> | ||
| + | }} | ||
| + | }}}}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
| − | |||
| − | |||
| − | |||
| − | |||
</noinclude> | </noinclude> | ||
Latest revision as of 14:42, 9 April 2020
Usage
{{Cospar |id= |name= }}
Used to display an International Designator (also known as COSPAR ID or NSSDCA id) with a link to the corresponding NASA Space Science Data Coordinated Archive catalog entry.
{{Cospar|1990-037B}} → 1990-037B
{{Cospar|1990-037B|Hubble Space Telescope}} → Hubble Space Telescope
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.
TemplateData for Cospar
Displays an International Designator (also known as COSPAR ID or NSSDCA id) with a link to the corresponding NASA Space Science Data Coordinated Archive catalog entry.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| ID | id 1 | International Designator for a man-made object in space
| String | required |
| Name | name 2 | Name to display instead of the ID
| Line | suggested |
| The above documentation is transcluded from Template:Cospar/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |