Difference between revisions of "Template:Ma/doc"

From AAPG Wiki
Jump to navigation Jump to search
m (link)
(→‎Examples: ok, last one :))
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
  
 
==Examples==
 
==Examples==
*<nowiki>{{mya|65|million years old}}</nowiki>
+
{| class="wikitable"
:gives
+
! Wikitext || Results in
<blockquote>
+
|-
{{Ma|65|million years old}}
+
| <code><nowiki>{{Ma|65|million years old}}</nowiki></code>  
</blockquote>
+
| {{Ma|65|million years old}}
(and the "million years old" will not wrap; it will remain on the same line.)
+
|-
 
+
| <code><nowiki>{{Ma|Cambrian|Myr|error=show}}</nowiki></code>  
*<nowiki>{{mya|Cambrian|MA|error=show}}</nowiki>
+
| {{Ma|Cambrian|Myr|error=show}}
:gives
+
|-
<blockquote>
+
| <code><nowiki>{{Ma|5.945|million years ago|error=0.5|round=1}}</nowiki></code>  
{{mya|CAMBRIAN|MA|error=sha}}
+
| {{Ma|5.945|million years ago|error=0.5|round=1}}
</blockquote>
+
|-
*<nowiki>{{Ma|250.9876|error=5|round=2}}</nowiki>
+
| <code><nowiki>{{Ma|250|65|Ma ago}}</nowiki></code>  
:gives
+
| {{Ma|250|65|Ma ago}}
<blockquote>
+
|-
{{Ma|250.9876|error=5|round=2}}
+
| <code><nowiki>{{Ma|Cretaceous}}</nowiki></code>
</blockquote>
+
| {{Ma|Cretaceous}}
*To cite a range of years, <nowiki>{{Ma|250|65}}</nowiki>
+
|-
:gives
+
| <code><nowiki>{{Ma|Selandian|Bartonian}}</nowiki></code>
<blockquote>
+
| {{Ma|Selandian|Bartonian}}
{{Ma|250|65}}
+
|}
</blockquote>
 
  
 
== Rationale ==
 
== Rationale ==

Latest revision as of 13:57, 5 November 2013

Usage

Use the format {{Ma|Years_ago|Suffix|error=Error|round=Degree of accuracy}}

Years_ago can take a number (don't include commas, which are added automatically), or a period name (e.g. Cambrian), in which case it will return the date the period started.

Suffix is optional and defaults to "million years ago".

Error is an uncertainty and will be displayed as ± error. If a non-numeric value is entered, it will show the error associated with the period specified in Years_ago.

Degree of accuracy is the point at which to round the figure, as per the #expr: parserfunction. 0 will chop the figure at the decimal point; -1 will round it to the nearest 10; 1 will allow one decimal place.

Examples

Wikitext Results in
{{Ma|65|million years old}} 65 million years old
{{Ma|Cambrian|Myr|error=show}} 541± 0.3 Myr
{{Ma|5.945|million years ago|error=0.5|round=1}} 5.9 ± 0.5 million years ago
{{Ma|250|65|Ma ago}} 250 to 65 Ma ago
{{Ma|Cretaceous}} 145 Ma
{{Ma|Selandian|Bartonian}} 61.6 to 41.3 Ma

Rationale

With geological time, it is often genuinely useful for the lay reader, with little grasp of how long ago 500 million years really is, to be able to quickly flick to a timescale. This template allows an easy way to implement such links.