You are here

public static function jDateTime::createCarbonFromFormat in Persian Date for Drupal 8 8.4

Parameters

$format:

$str:

null $timezone:

Return value

Carbon

2 calls to jDateTime::createCarbonFromFormat()
Date::opBetween in src/Plugin/views/filter/Date.php
Filters by operator between.
Date::opSimple in src/Plugin/views/filter/Date.php

File

src/Library/Jalali/jDateTime.php, line 807

Class

jDateTime
Class jDateTime @package Morilog\Jalali

Namespace

Drupal\persian_date\Library\Jalali

Code

public static function createCarbonFromFormat($format, $str, $timezone = null) {
  $dateTime = self::createDatetimeFromFormat($format, $str, $timezone);
  return Carbon::createFromTimestamp($dateTime
    ->getTimestamp(), $dateTime
    ->getTimezone());
}