Difference between revisions of "Template:Deg2DMS/doc"
imported>Tom.Reding m (→Description: +)) |
imported>Tom.Reding m (→Usage: ce & WL) |
||
| Line 7: | Line 7: | ||
== Usage == | == Usage == | ||
| − | <code><nowiki>{{Deg2DMS|</nowiki>'' | + | <code><nowiki>{{Deg2DMS|</nowiki>''positive decimal degrees''<nowiki>|p=</nowiki>''precision''<nowiki>|sup=</nowiki>''ms''<nowiki>}}</nowiki></code>.<br> |
Parameter '''p''' is optional and defaults to 3.<br> | Parameter '''p''' is optional and defaults to 3.<br> | ||
| − | Parameter '''sup''' is optional and defaults to not-used, <blank>, or <null>, which produces the apostrophe-format for | + | Parameter '''sup''' is optional and defaults to not-used, <blank>, or <null>, which produces the apostrophe-format for [[arcminute]]s and [[arcsecond]]s, by default ({{Deg2DMS|1.0342|p=0}}). It may be activated by "ms", or any text, to produce the m-s-format for arcminutes and arcseconds ({{Deg2DMS|1.0342|p=0|sup=ms}}). |
For example:<br> | For example:<br> | ||
Revision as of 14:47, 21 April 2016
| File:Edit-copy green.svg | This is a documentation subpage for Template:Deg2DMS. It contains usage information, categories and other content that is not part of the original template page. |
Description
This template converts a positive decimal degree value to degrees° minutes' seconds'' format or to degrees° minutesm secondss format (the degree symbol ° is invariant between the two).
Usage
{{Deg2DMS|positive decimal degrees|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 arcminutes and arcseconds, by default (1° 2′ 3″). It may be activated by "ms", or any text, to produce the m-s-format for arcminutes and arcseconds (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