New Tooltip interface
This commit is contained in:
13
inc/spot.php
13
inc/spot.php
@@ -608,7 +608,18 @@ class Spot extends Main
|
||||
//Seconds
|
||||
$fSecond = round($dLeft * 3600, 1);
|
||||
|
||||
return $iDegree.'°'.$iMinute."'".$fSecond.'"'.$sDirection;
|
||||
return
|
||||
$iDegree.'°'.
|
||||
self::getNumberWithLeadingZeros($iMinute, 2, 0)."'".
|
||||
self::getNumberWithLeadingZeros($fSecond, 2, 1).'"'.
|
||||
$sDirection;
|
||||
}
|
||||
|
||||
public static function getNumberWithLeadingZeros($fValue, $iNbLeadingZeros, $iNbDigits){
|
||||
$sDecimalSeparator = ".";
|
||||
if($iNbDigits > 0) $iNbLeadingZeros += mb_strlen($sDecimalSeparator) + $iNbDigits;
|
||||
$sPattern = '%0'.$iNbLeadingZeros.$sDecimalSeparator.$iNbDigits.'f';
|
||||
return sprintf($sPattern, $fValue);
|
||||
}
|
||||
|
||||
public function getTimeFormat($iTime, $sTimeZone='') {
|
||||
|
||||
Reference in New Issue
Block a user