You are here

public function Carbon::addHours in Persian Date for Drupal 8 8.4

Add hours to the instance. Positive $value travels forward while negative $value travels into the past.

Parameters

int $value:

Return value

static

2 calls to Carbon::addHours()
Carbon::addHour in src/Library/Carbon/Carbon.php
Add an hour to the instance
Carbon::subHours in src/Library/Carbon/Carbon.php
Remove hours from the instance

File

src/Library/Carbon/Carbon.php, line 2426

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function addHours($value) {
  return $this
    ->modify((int) $value . ' hour');
}