Difference between revisions of "Template:Coord/dec2dms/dms1"

From blackwiki
Jump to navigation Jump to search
imported>MZMcBride
m (Unprotected Template:Coord/dec2dms/dms1: this is a wiki)
imported>Dpleibovitz
m (inline documentation)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#expr:{{{1}}} mod 360}}°{{padleft:{{#expr:{{{1}}} * 60 mod 60}}|2|0}}′{{padleft:{{#expr:({{{1}}} * 36000 round 0) mod 600 / 10}}|2|0}}″<noinclude>[[Category:Coord template]]</noinclude>
+
{{#expr:floor({{{1|9.2}}}+1/72000) mod 360}}°{{padleft:{{#expr:floor(({{{1|9.2}}}-trunc({{{1|9.2}}}))*60+1/1200) mod 60}}|2|0}}′{{padleft:{{padright:{{#expr:(({{{1|9.2}}}-trunc({{{1|9.2}}}))*36000 round 0) mod 600 / 10}}|{{#ifexpr:(({{{1|9.2}}}-trunc({{{1|9.2}}}))*36000 round 0) mod 600 >= 100|4|3}}|.0}}|4|0}}″<noinclude>
 +
{{doc|content=
 +
This is a helper template for [[Template:Coord]], converting a positive longitude or latitude, in parameter 1, in decimal notation to a degrees/minutes/seconds (dms) display. Examples:
 +
 
 +
::* {{tlx|Coord/dec2dms/dms1|3.7415729075568422}} &rarr; {{Coord/dec2dms/dms1|3.7415729075568422}}
 +
::* {{tlx|Coord/dec2dms/dms1|38.539000041782856}} &rarr; {{Coord/dec2dms/dms1|38.539000041782856}}
 +
 
 +
Rarely used, but probably should not be deleted, because it may be used more in the future.
 +
[[Category:Coord template]]
 +
}}
 +
</noinclude>

Latest revision as of 03:21, 11 July 2014

9°12′00.0″

Template documentation

This is a helper template for Template:Coord, converting a positive longitude or latitude, in parameter 1, in decimal notation to a degrees/minutes/seconds (dms) display. Examples:

Rarely used, but probably should not be deleted, because it may be used more in the future.