Calculates the previous page
@returns {int} The previous page number
338491
function () {
            var state = this.state,
                currentPage = state.pages[state.currentPage - 1],
                rowIndex = currentPage.rowIndex,
                prevRow = state.rows[rowIndex - 1];
            return prevRow && prevRow[0] + 1 || state.currentPage;
        }
1265625
private function calc()
    {
        $this->limitOffset = max((int)(($this->page - 1) * $this->count), 0);
        $this->limitEndOffset = $this->limitOffset + $this->count;
    }
195889
protected function calculateStartAndEndPage()
    {
        $currentPage = $this->pagerfanta->getCurrentPage();
        $nbPages = $this->pagerfanta->getNbPages();

        $startPage = $currentPage - $this->proximity;
        $endPage = $currentPage + $this->proximity;

        if ($startPage < 1) {
            $endPage = $this->calculateEndPageForStartPageUnderflow($startPage, $endPage, $nbPages);
            $startPage = 1;
        }

        if ($endPage > $nbPages) {
            $startPage = $this->calculateStartPageForEndPageOverflow($startPage, $endPage, $nbPages);
            $endPage = $nbPages;
        }

        $this->startPage = (int) $startPage;
        $this->endPage = (int) $endPage;
    }
738284
def get_page_numbers(
        current_page, num_pages,
        extremes=DEFAULT_CALLABLE_EXTREMES,
        arounds=DEFAULT_CALLABLE_AROUNDS,
        arrows=DEFAULT_CALLABLE_ARROWS):
    
    page_range = range(1, num_pages + 1)
    pages = []
    if current_page != 1:
        if arrows:
            pages.append('first')
        pages.append('previous')

    # Get first and last pages (extremes).
    first = page_range[:extremes]
    pages.extend(first)
    last = page_range[-extremes:]

    # Get the current pages (arounds).
    current_start = current_page - 1 - arounds
    if current_start < 0:
        current_start = 0
    current_end = current_page + arounds
    if current_end > num_pages:
        current_end = num_pages
    current = page_range[current_start:current_end]

    # Mix first with current pages.
    to_add = current
    if extremes:
        diff = current[0] - first[-1]
        if diff > 1:
            pages.append(None)
        elif diff < 1:
            to_add = current[abs(diff) + 1:]
    pages.extend(to_add)

    # Mix current with last pages.
    if extremes:
        diff = last[0] - current[-1]
        to_add = last
        if diff > 1:
            pages.append(None)
        elif diff < 1:
            to_add = last[abs(diff) + 1:]
        pages.extend(to_add)

    if current_page != num_pages:
        pages.append('next')
        if arrows:
            pages.append('last')
    return pages
604915
function previously(currentValue, partial) {
    var previous = {};
    Object.keys(partial).forEach(function(key) {
        if (isObject(currentValue[key] && partial[key])) {
            previous[key] = previously(currentValue[key], partial[key]);
        } else {
            previous[key] = currentValue[key];
        }
    });
    return previous;
}
1075416
function (val) {
            var state = this.state,
                pageNum = parseInt(val, 10);
            if (typeof val === 'string') {
                if (val === Crocodoc.SCROLL_PREVIOUS && state.currentPage > 1) {
                    pageNum = this.calculatePreviousPage();
                }
                else if (val === Crocodoc.SCROLL_NEXT && state.currentPage < this.numPages) {
                    pageNum = this.calculateNextPage();
                }
                else if (!pageNum) {
                    return;
                }
            }
            else if (!pageNum && pageNum !== 0) {
                // pageNum is not a number
                return;
            }
            pageNum = util.clamp(pageNum, 1, this.numPages);
            this.scrollToPage(pageNum);
        }
947697
def previous(self):
        
        if self._page.has_previous():
            return self._endless_page(
                self._page.previous_page_number(),
                label=settings.PREVIOUS_LABEL)
        return ''
1121247
protected function _recalculate()
	{
		// calculate the number of pages
		$this->config['total_pages'] = (int) ceil($this->config['total_items'] / $this->config['per_page']) ?: 1;

		// get the current page number, either from the one set, or from the URI or the query string
		if ($this->config['current_page'])
		{
				$this->config['calculated_page'] = $this->config['current_page'];
		}
		else
		{
			if (is_string($this->config['uri_segment']))
			{
				$this->config['calculated_page'] = \Input::get($this->config['uri_segment'], 1);
			}
			else
			{
				$this->config['calculated_page'] = (int) \Request::main()->uri->get_segment($this->config['uri_segment']);
			}
		}

		// make sure the current page is within bounds
		if ($this->config['calculated_page'] > $this->config['total_pages'])
		{
			$this->config['calculated_page'] = $this->config['total_pages'];
		}
		elseif ($this->config['calculated_page'] < 1)
		{
			$this->config['calculated_page'] = 1;
		}

		// the current page must be zero based so that the offset for page 1 is 0.
		$this->config['offset'] = ($this->config['calculated_page'] - 1) * $this->config['per_page'];
	}
892425
def list_records_previous_page(self):
        
        uri = self._paging.get("record", {}).get("prev_uri")
        if uri is None:
            raise exc.NoMoreResults("There are no previous pages of records "
                    "to list.")
        return self._list_records(uri)
528181
private function _show_previous() {

        $output = '';

        // if "always_show_navigation" is TRUE or
        // if the number of total pages available is greater than the number of selectable pages
        // it means we can show the "previous page" link
        if ($this->_properties['always_show_navigation'] || $this->_properties['total_pages'] > $this->_properties['selectable_pages']) {

            // CSS classes to be applied to the list item, if any
            $css_classes = isset($this->_properties['css_classes']['list_item']) && $this->_properties['css_classes']['list_item'] != '' ? array(trim($this->_properties['css_classes']['list_item'])) : array();

            // if we're on the first page, the link is disabled
            if ($this->_properties['page'] == 1) $css_classes[] = 'disabled';

            // generate markup
            $output = '<li' .

                // add CSS classes to the list item, if necessary
                (!empty($css_classes) ? ' class="' . implode(' ', $css_classes) . '"' : '') . '><a href="' .

                // the href is different if we're on the first page
                ($this->_properties['page'] == 1 ? 'javascript:void(0)' : $this->_build_uri($this->_properties['page'] - 1)) . '"' .

                // add CSS classes to the anchor, if necessary
                (isset($this->_properties['css_classes']['anchor']) && $this->_properties['css_classes']['anchor'] != '' ? ' class="' . trim($this->_properties['css_classes']['anchor']) . '"' : '') .

                // good for SEO
                // http://googlewebmastercentral.blogspot.de/2011/09/pagination-with-relnext-and-relprev.html
                ' rel="prev">' .

                ($this->_properties['reverse'] ? $this->_properties['next'] : $this->_properties['previous']) . '</a></li>';

        }

        // return the resulting string
        return $output;

    }
1180070
def accel_prev(self, *args):
        
        if self.get_notebook().get_current_page() == 0:
            self.get_notebook().set_current_page(self.get_notebook().get_n_pages() - 1)
        else:
            self.get_notebook().prev_page()
        return True
1202401
function(){
            var pageYOffset = 0;
            if(window.pageYOffset){
                pageYOffset = window.pageYOffset;
            }else if(document.documentElement && document.documentElement.scrollTop){
                pageYOffset = document.documentElement.scrollTop;
            }
            return pageYOffset;
        }
578381
def previous_page(self):
        
        if not self.previous_page_url:
            return None

        response = self._version.domain.twilio.request('GET', self.previous_page_url)
        cls = type(self)
        return cls(self._version, response, self._solution)
184848
private int determineValidPageNumberFrom(int userPage) {
        if (userPage <= 0) {
            return 0;
        }
        if (originalUserPages != null) {
            if (userPage >= originalUserPages.length) {
                return originalUserPages.length - 1;
            }
        } else {
            if (userPage >= documentPageCount) {
                return documentPageCount - 1;
            }
        }
        return userPage;
    }
846665
public function getPageCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Pages')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Pages');
        }

        return 0;
    }
182328
function Page(page) {
  if (!page) page = {};
  for (var key in page) this[key] = page[key];
  if (!this.hasOwnProperty('idx')) this.idx = 0;
  if (!this.hasOwnProperty('total')) this.total = 1;
  if (!this.hasOwnProperty('current')) {
    this.current = this.total;
  }
}
565419
function() {
        for (var p=0;p<this.pages.length;++p) {
            var cal = this.pages[p];
            cal.nextMonth();
        }
    }