Returns the offset of the item the current page starts at.

@return int
773655
public function getPageStart()
    {
        $request = $this->getRequest();
        if ($this->pageStart === null) {
            if ($request
                && isset($request[$this->getPaginationGetVar()])
                && $request[$this->getPaginationGetVar()] > 0
            ) {
                $this->pageStart = (int)$request[$this->getPaginationGetVar()];
            } else {
                $this->pageStart = 0;
            }
        }

        return $this->pageStart;
    }
369893
public function getOffsetPosting()
    {
        $this->getJournal()->assertIsSimpleJournal();

        foreach ($this->getJournal()->getPostings() as $posting) {
            if ($posting != $this) {
                return $posting;
            }
        }
    }
404560
def offset(self):
        """"""
        if not self._pages:
            return None

        pos = 0
        for page in self._pages:
            if page is None:
                return None
            if not page.is_final:
                return None
            if not pos:
                pos = page.is_contiguous[0] + page.is_contiguous[1]
                continue
            if pos != page.is_contiguous[0]:
                return None
            pos += page.is_contiguous[1]

        page = self._pages[0]
        offset = page.is_contiguous[0]
        if (page.is_imagej or page.is_shaped) and len(self._pages) == 1:
            # truncated files
            return offset
        if pos == offset + product(self.shape) * self.dtype.itemsize:
            return offset
        return None
28481
public function getListOffset($page = 1, $default = 0)
    {

        $limit = $this->getListLimit();
        $offset = $this->getState("limitoffset", intval($default));

        $offset = empty($offset) ? (empty($page) || (int)$page <= 1) ? intval($default) : intval($page - 1) * $limit : $offset;

        return $offset;
    }
240835
public function prevUrl()
    {
        $prev = $this->current() - 1;
        return ($prev > 0 && $prev < $this->pages()) ? $this->parseUrl($prev) : "";
    }
342866
public function current()
    {
        $page = $this->pageIterator->current();

        return isset($page[$this->pageIndex])
            ? $page[$this->pageIndex]
            : null;
    }
1013672
public function currentPosition()
    {
        $parent = $this->parent();
        $collection = $parent ? $parent->collection('content', false) : null;
        if ($collection instanceof Collection) {
            return $collection->currentPosition($this->path());
        }

        return 1;
    }
938322
public function getPrevPageUrl()
    {
        if ($this->pageOffset['end'] >= $this->getFilesize() - 1) {
            return false;
        }

        return [
            'file' => $this->file, 'offset' => $this->pageOffset['end']
        ];
    }
1314919
private function calculateFirstItemOnPage()
    {
        // When an offset is used, increase the first item with 1
        $offsetItem = $this->getOffset() !== 0 ? 1 : 0;

        // When there are a total amount of items and the offset is zero, increase 1
        if ($this->getTotalItems() !== 0 && $offsetItem === 0) {
            $offsetItem = 1;
        }

        // Determine the first item on the page
        $firstItem = $this->getOffset() + $offsetItem;

        $this->setFirstItemOnPage((int)$firstItem);
    }
19150
public function getAge() {
		if($this->Started) {
			$started = intval($this->dbObject('Started')->Format('U'));
			$now = intval(SS_Datetime::now()->Format('U'));
			if($started && $now) return $now - $started;
		}
		return 0;
	}
628741
public function getLastPage()
    {
        $perPage = max($this->paginatedResult->getQuery()->getItemsPerPage(), 1);
        $total = $this->getTotal();
        $pageCount = $total / $perPage;

        if (round($pageCount, 1) - round($pageCount, 0) > 0) {
            return round($pageCount, 0) + 1;
        }

        return round($pageCount, 0);
    }
331115
private function calculatePageLimitAndOffset()
    {
        $pageUri = '';
        $pageUri = Url::segment(3);
        $pageNumber = ($pageUri !== '') ? $pageUri : 0;

        if ($pageNumber) {
            //calculate starting point of pagination
            $start = ($this->getPageNumber() - 1) * $this->perPage;
        } else {
            $start = 0; //set start to 0 by default.
        }

        $this->setPageNumber($pageNumber);
        $this->setPaginationOffset($start);
    }
32675
public function getPageCount() : int
    {
        return intval($this->count / $this->pageSize) + ($this->count % $this->pageSize == 0 ? 0 : 1);
    }
1237246
public function getFirstShown()
    {
        $firstShown = $this->getGridPagerState()->firstShown ?: 1;
        // Prevent visiting a page with an offset higher than the total number of items
        if ($firstShown > $this->getTotalRecords()) {
            $this->getGridPagerState()->firstShown = $firstShown = 1;
        }
        return $firstShown;
    }
1031881
public function getFinish()
	{
		$content = $this->getPageRange($this->lastPage - 1, $this->lastPage);

		return $this->getDots().$content;
	}
1285228
private function _currentPage(): int
    {
        $currentPage = Craft::$app->getRequest()->getQueryParam($this->pageParam, 1);

        if (is_numeric($currentPage) && $currentPage > $this->totalPages) {
            $currentPage = $this->totalPages > 0 ? $this->totalPages : 1;
        } else if (!is_numeric($currentPage) || $currentPage < 0) {
            $currentPage = 1;
        }

        return (int)$currentPage;
    }
504365
public function getCurrentPage()
	{
		$page = (int) $this->currentPage ?: $this->request->query->get($this->pageName, 1);

		if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false)
		{
			return 1;
		}

		return $page;
	}