Difference between revisions of "Template:Deg2HMS/doc"
Jump to navigation
Jump to search
imported>Tom.Reding (Will try to add "h", "m", and "s" superscript capabilities in the future.) |
imported>Tom.Reding (Updated with sup parameter.) |
||
| Line 3: | Line 3: | ||
== Usage == | == Usage == | ||
| − | <code><nowiki>{{Deg2HMS|</nowiki>''decimaldegrees''<nowiki>|p=</nowiki>''precision''<nowiki>}}</nowiki></code>. | + | <code><nowiki>{{Deg2HMS|</nowiki>''decimaldegrees''<nowiki>|p=</nowiki>''precision''<nowiki>|sup=</nowiki>''superscript''<nowiki>}}</nowiki></code>. |
| − | This template converts a decimal degree value, typically [[right ascension]], to hours:minutes:seconds format. | + | 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. |
| − | <code><nowiki>{{Deg2HMS|266.416837|p=4}}</nowiki></code> returns {{Deg2HMS|266.416837|p=4}}. | + | <code><nowiki>{{Deg2HMS|266.416837|p=4}}</nowiki></code> returns {{Deg2HMS|266.416837|p=4}}.<br> |
| + | <code><nowiki>{{Deg2HMS|266.416837|p=4|sup=yes}}</nowiki></code> returns {{Deg2HMS|266.416837|p=4|sup=yes}}.<br> | ||
| + | <code><nowiki>{{Deg2HMS|266.416837|p=4|sup=no}}</nowiki></code> returns {{Deg2HMS|266.416837|p=4|sup=no}}.<br> | ||
| + | <code><nowiki>{{Deg2HMS|266.416837|p=4|sup=1}}</nowiki></code> returns {{Deg2HMS|266.416837|p=4|sup=1}}.<br> | ||
| + | |||
| + | <code><nowiki>{{Deg2HMS|266.416837|p=4|sup=0}}</nowiki></code> returns {{Deg2HMS|266.416837|p=4|sup=0}}.<br> | ||
| + | |||
| + | |||
| + | Parameter '''p''' is optional and defaults to 3.<br> | ||
| + | Parameter '''sup''' is optional and defaults to 0 (not displayed). | ||
| − | |||
==See also== | ==See also== | ||
Revision as of 14:25, 21 November 2014
| This is a documentation subpage for Template:Deg2HMS. It contains usage information, categories and other content that is not part of the original template page. |
Usage
{{Deg2HMS|decimaldegrees|p=precision|sup=superscript}}.
This template converts a decimal degree value, typically right ascension, to hours:minutes:seconds format or to hoursh minutesm secondss format.
{{Deg2HMS|266.416837|p=4}} returns 17:45:40.0409.
{{Deg2HMS|266.416837|p=4|sup=yes}} returns 17h 45m 40.0409s.
{{Deg2HMS|266.416837|p=4|sup=no}} returns 17h 45m 40.0409s.
{{Deg2HMS|266.416837|p=4|sup=1}} returns 17h 45m 40.0409s.
{{Deg2HMS|266.416837|p=4|sup=0}} returns 17h 45m 40.0409s.
Parameter p is optional and defaults to 3.
Parameter sup is optional and defaults to 0 (not displayed).
See also