Difference between revisions of "Template:Deg2HMS/doc"

From blackwiki
Jump to navigation Jump to search
imported>Tom.Reding
(Simplified.)
imported>Tom.Reding
m (WL)
Line 3: Line 3:
 
== Description ==
 
== Description ==
  
This template converts a decimal degree value, typically [[right ascension]], to ''hours'':''minutes'':''seconds'' format or to ''hours''<sup>h</sup> ''minutes''<sup>m</sup> ''seconds''<sup>s</sup> format.
+
This template converts a [[decimal degree]] value, typically [[right ascension]], to ''[[Hour angle|hours]]'':''[[Minute and second of arc|minutes]]'':''[[Minute and second of arc|seconds]]'' format or to ''hours''<sup>h</sup> ''minutes''<sup>m</sup> ''seconds''<sup>s</sup> format.
  
 
== Usage ==
 
== Usage ==

Revision as of 13:57, 26 April 2016

Description

This template converts a decimal degree value, typically right ascension, to hours:minutes:seconds format or to hoursh minutesm secondss format.

Usage

{{Deg2HMS|decimaldegrees|p=precision|sup=superscripts}}.

Parameter p is optional and defaults to 3.
Parameter sup is optional and defaults to not-used, <blank>, or <null>. It is activated by "yes", or any text.

For example:
{{Deg2HMS|266.416837|p=4}} returns 17:45:40.0409.
{{Deg2HMS|266.416837|p=4|sup= }} returns 17:45:40.0409.

{{Deg2HMS|266.416837|p=4|sup=yes}} returns 17h 45m 40.0409s.
{{Deg2HMS|266.416837|p=4|sup=y}} returns 17h 45m 40.0409s.
{{Deg2HMS|266.416837|p=4|sup=no}} returns 17h 45m 40.0409s.

See also