public function leapSec()
    {
        // Load data file
        $file = new \SplFileObject($this->storage('tai-utc.dat'));

        $taiUTC = 0;
        while ($file->valid()) {
            $line = $file->getCurrentLine();

            // Check for empty line
            if (trim($line) == '') {
                break;
            }

            // Get JD and leap seconds as of that JD
            $jd = (float)substr($line, 17, 9);

            // If the leap second JD exceeds or is = to this instance, break
            if ($jd > $this->jd) {
                break;
            }

            // Within range, use current leap seconds
            $taiUTC = (float)substr($line, 38, 10);
        }

        // Return leap seconds
        return $taiUTC;
    }
public function leapSec()
    {
        // Load data file
        $file = new \SplFileObject($this->storage('tai-utc.dat'));

        $taiUTC = 0;
        while ($file->valid()) {
            $line = $file->getCurrentLine();

            // Check for empty line
            if (trim($line) == '') {
                break;
            }

            // Get JD and leap seconds as of that JD
            $jd = (float)substr($line, 17, 9);

            // If the leap second JD exceeds or is = to this instance, break
            if ($jd > $this->jd) {
                break;
            }

            // Within range, use current leap seconds
            $taiUTC = (float)substr($line, 38, 10);
        }

        // Return leap seconds
        return $taiUTC;
    }
public function leapSec ( ) { // Load data file $ file = new \ SplFileObject ( $ this -> storage ( 'tai-utc.dat' ) ) ; $ taiUTC = 0 ; while ( $ file -> valid ( ) ) { $ line = $ file -> getCurrentLine ( ) ; // Check for empty line if ( trim ( $ line ) == '' ) { break ; } // Get JD and leap seconds as of that JD $ jd = ( float ) substr ( $ line , 17 , 9 ) ; // If the leap second JD exceeds or is = to this instance, break if ( $ jd > $ this -> jd ) { break ; } // Within range, use current leap seconds $ taiUTC = ( float ) substr ( $ line , 38 , 10 ) ; } // Return leap seconds return $ taiUTC ; }
Finds the number of leap seconds as of the instance's date.

@return float
Finds the number of leap seconds as of the instance s date .