Difference between revisions of "Template:HMS2Deg/doc"
Jump to navigation
Jump to search
imported>Tom.Reding m (Corrected /noinclude typo to /includeonly.) |
imported>Tom.Reding (WL + sup update) |
||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
− | This template converts an [[hour angle]], given in ''hours'':''minutes'':''seconds'' format, to [[decimal degrees]]. | + | This template converts an [[hour angle]], given in ''hours'':''[[Minute and second of arc|minutes]]'':''[[Minute and second of arc|seconds]]'' format, to [[decimal degrees]]. |
+ | |||
== Usage == | == Usage == | ||
− | <code><nowiki>{{HMS2Deg|</nowiki>''hours''<nowiki>|</nowiki>''minutes''<nowiki>|</nowiki>''seconds''<nowiki>|p=</nowiki>''precision''<nowiki>}}</nowiki></code>.<br> | + | <code><nowiki>{{HMS2Deg|</nowiki>''hours''<nowiki>|</nowiki>''minutes''<nowiki>|</nowiki>''seconds''<nowiki>|p=</nowiki>''precision''<nowiki>|sup=</nowiki>''superscript''<nowiki>}}</nowiki></code>.<br> |
− | ''Minutes'', ''seconds'', and parameter ''' | + | ''Minutes'', ''seconds'', parameter '''p''', and parameter '''sup''' are all optional and default to 0, 0, 6, and <null>, respectively. To include the degree symbol <code>°</code>, add any text to {{para|sup}}. |
For example:<br> | For example:<br> | ||
− | <code><nowiki>{{HMS2Deg|12|29|06.7|p=5}}</nowiki></code> returns {{HMS2Deg|12|29|06.7|p=5}}.<br> | + | <code><nowiki>{{HMS2Deg|12|29|06.7|p=5|sup=y}}</nowiki></code> returns {{HMS2Deg|12|29|06.7|p=5|sup=y}}.<br> |
<code><nowiki>{{HMS2Deg|12|p=5}}</nowiki></code> returns {{HMS2Deg|12|p=5}}.<br> | <code><nowiki>{{HMS2Deg|12|p=5}}</nowiki></code> returns {{HMS2Deg|12|p=5}}.<br> | ||
<code><nowiki>{{HMS2Deg|12}}</nowiki></code> returns {{HMS2Deg|12}}. | <code><nowiki>{{HMS2Deg|12}}</nowiki></code> returns {{HMS2Deg|12}}. |
Revision as of 14:15, 26 April 2016
![]() | This is a documentation subpage for Template:HMS2Deg. It contains usage information, categories and other content that is not part of the original template page. |
Description
This template converts an hour angle, given in hours:minutes:seconds format, to decimal degrees.
Usage
{{HMS2Deg|hours|minutes|seconds|p=precision|sup=superscript}}
.
Minutes, seconds, parameter p, and parameter sup are all optional and default to 0, 0, 6, and <null>, respectively. To include the degree symbol °
, add any text to |sup=
.
For example:
{{HMS2Deg|12|29|06.7|p=5|sup=y}}
returns 187.27792°.
{{HMS2Deg|12|p=5}}
returns 180.
{{HMS2Deg|12}}
returns 180.