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

From blackwiki
Jump to navigation Jump to search
imported>Addbot
m (Bot: Migrating 2 interwiki links, now provided by Wikidata on d:q7656258)
imported>Wikid77
(cut "includeonly" tag & used default 15; +2 examples)
Line 1: Line 1:
<includeonly>{{#expr:floor({{{1}}}+1/72000) mod 360}}°{{padleft:{{#expr:floor(({{{1}}}-trunc({{{1}}}))*60+1/1200) mod 60}}|2|0}}′{{padleft:{{padright:{{#expr:(({{{1}}}-trunc({{{1}}}))*36000 round 0) mod 600 / 10}}|{{#ifexpr:(({{{1}}}-trunc({{{1}}}))*36000 round 0) mod 600 >= 100|4|3}}|.0}}|4|0}}″</includeonly><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>
  
This is a helper template for [[Template:Coord]], converting a positive longitude or latitude in decimal notation to a Degrees/Minutes/Seconds display. Currently unused, but probably should not be deleted, because it may be used in the future.
+
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:
  
 +
::* {&#123;Coord/dec2dms/dms1|3.7415729075568422}} - {{Coord/dec2dms/dms1|3.7415729075568422}}
 +
::* {&#123;Coord/dec2dms/dms1|38.539000041782856}} - {{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]]
 
[[Category:Coord template]]
  
 
</noinclude>
 
</noinclude>

Revision as of 08:39, 27 December 2013

9°12′00.0″

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:

  • {{Coord/dec2dms/dms1|3.7415729075568422}} - 3°44′29.7″
  • {{Coord/dec2dms/dms1|38.539000041782856}} - 38°32′20.4″

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