Difference between revisions of "Template:Deg2DMS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Tom.Reding
(+{{Doc}})
 
imported>Tom.Reding
Line 3: Line 3:
 
== Description ==
 
== Description ==
  
This template converts a positive decimal degree value to ''degrees''°&nbsp;''minutes''&apos;&nbsp;''seconds''&apos;&apos; format or to ''degrees''°&nbsp;''minutes''<sup>m</sup>&nbsp;''seconds''<sup>s</sup> format (the degree symbol <code>°</code> is invariant between the two.
+
This template converts a positive decimal degree value to ''degrees''°&nbsp;''minutes''&apos;&nbsp;''seconds''&apos;&apos; format or to ''degrees''°&nbsp;''minutes''<sup>m</sup>&nbsp;''seconds''<sup>s</sup> format (the degree symbol <code>°</code> is invariant between the two).
  
 
== Usage ==
 
== Usage ==

Revision as of 14:42, 21 April 2016

Description

This template converts a positive decimal degree value to degrees° minutesseconds'' format or to degrees° minutesm secondss format (the degree symbol ° is invariant between the two).

Usage

{{Deg2DMS|decimaldegrees|p=precision|sup=ms}}.

Parameter p is optional and defaults to 3.
Parameter sup is optional and defaults to not-used, <blank>, or <null>, which produces the apostrophe-format for minutes and seconds, by default (1° 2′ 3″). It may be activated by "ms", or any text, to produce the m-s-format for minutes and seconds (1° 2m 3s).

For example:
{{Deg2DMS|266.416837|p=4}} returns 266° 25′ 0.6132″.
{{Deg2DMS|266.416837|p=4|sup= }} returns 266° 25′ 0.6132″.

{{Deg2DMS|266.416837|p=4|sup=ms}} returns 266° 25m 0.6132s.
{{Deg2DMS|266.416837|p=4|sup=no}} returns 266° 25m 0.6132s.
{{Deg2DMS|266.416837|p=4|sup=10}} returns 266° 25m 0.6132s.

See also