You are here

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

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

Parameters

int $value:

Return value

static

2 calls to Carbon::addWeekdays()
Carbon::addWeekday in src/Library/Carbon/Carbon.php
Add a weekday to the instance
Carbon::subWeekdays in src/Library/Carbon/Carbon.php
Remove weekdays from the instance

File

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

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function addWeekdays($value) {

  // fix for https://bugs.php.net/bug.php?id=54909
  $t = $this
    ->toTimeString();
  $this
    ->modify((int) $value . ' weekday');
  return $this
    ->setTimeFromTimeString($t);
}