|
| getDefaultTimezonePath () |
|
| getDefaultTimezone () |
|
| getDateFormat ($type=\IntlDateFormatter::SHORT) |
|
| getDateFormatWithLongYear () |
|
| getTimeFormat ($type=null) |
|
| getDateTimeFormat ($type) |
|
| date ($date=null, $locale=null, $useTimezone=true, $includeTime=true) |
|
| scopeDate ($scope=null, $date=null, $includeTime=false) |
|
| scopeTimeStamp ($scope=null) |
|
| formatDate ( $date=null, $format=\IntlDateFormatter::SHORT, $showTime=false) |
|
| getConfigTimezone ($scopeType=null, $scopeCode=null) |
|
| isScopeDateInInterval ($scope, $dateFrom=null, $dateTo=null) |
|
| formatDateTime ( $date, $dateType=\IntlDateFormatter::SHORT, $timeType=\IntlDateFormatter::SHORT, $locale=null, $timezone=null, $pattern=null) |
|
| convertConfigTimeToUtc ($date, $format='Y-m-d H:i:s') |
|
Timezone Interface @api
- Since
- 100.0.2
Definition at line 14 of file TimezoneInterface.php.
◆ convertConfigTimeToUtc()
convertConfigTimeToUtc |
( |
|
$date, |
|
|
|
$format = 'Y-m-d H:i:s' |
|
) |
| |
- Parameters
-
string | \DateTimeInterface | $date | |
string | $format | |
- Returns
- string
- Since
- 100.1.0
Implemented in Timezone.
◆ date()
date |
( |
|
$date = null , |
|
|
|
$locale = null , |
|
|
|
$useTimezone = true , |
|
|
|
$includeTime = true |
|
) |
| |
Create \DateTime object for current locale
- Parameters
-
mixed | $date | |
string | $locale | |
bool | $useTimezone | |
bool | $includeTime | |
- Returns
- \DateTime
Implemented in Timezone.
◆ formatDate()
formatDate |
( |
|
$date = null , |
|
|
|
$format = \IntlDateFormatter::SHORT , |
|
|
|
$showTime = false |
|
) |
| |
Format date using current locale options and time zone.
- Parameters
-
\DateTime | null | $date | |
int | $format | |
bool | $showTime | |
- Returns
- string
Implemented in Timezone.
◆ formatDateTime()
formatDateTime |
( |
|
$date, |
|
|
|
$dateType = \IntlDateFormatter::SHORT , |
|
|
|
$timeType = \IntlDateFormatter::SHORT , |
|
|
|
$locale = null , |
|
|
|
$timezone = null , |
|
|
|
$pattern = null |
|
) |
| |
- Parameters
-
string | \DateTimeInterface | $date | |
int | $dateType | |
int | $timeType | |
string | null | $locale | |
string | null | $timezone | |
string | null | $pattern | |
- Returns
- string
Implemented in Timezone.
◆ getConfigTimezone()
getConfigTimezone |
( |
|
$scopeType = null , |
|
|
|
$scopeCode = null |
|
) |
| |
Gets the scope config timezone
- Parameters
-
string | $scopeType | |
string | $scopeCode | |
- Returns
- string
Implemented in Timezone.
◆ getDateFormat()
getDateFormat |
( |
|
$type = \IntlDateFormatter::SHORT | ) |
|
Retrieve ISO date format
- Parameters
-
- Returns
- string
Implemented in Timezone.
◆ getDateFormatWithLongYear()
getDateFormatWithLongYear |
( |
| ) |
|
Retrieve short date format with 4-digit year
- Returns
- string
Implemented in Timezone.
◆ getDateTimeFormat()
getDateTimeFormat |
( |
|
$type | ) |
|
Retrieve ISO datetime format
- Parameters
-
- Returns
- string
Implemented in Timezone.
◆ getDefaultTimezone()
Retrieve timezone code
- Returns
- string
Implemented in Timezone.
◆ getDefaultTimezonePath()
getDefaultTimezonePath |
( |
| ) |
|
Return path to default timezone
- Returns
- string
Implemented in Timezone.
◆ getTimeFormat()
getTimeFormat |
( |
|
$type = null | ) |
|
Retrieve ISO time format
- Parameters
-
- Returns
- string
Implemented in Timezone.
◆ isScopeDateInInterval()
isScopeDateInInterval |
( |
|
$scope, |
|
|
|
$dateFrom = null , |
|
|
|
$dateTo = null |
|
) |
| |
Checks if current date of the given scope (in the scope timezone) is within the range
- Parameters
-
int | string | \Magento\Framework\App\ScopeInterface | $scope | |
string | null | $dateFrom | |
string | null | $dateTo | |
- Returns
- bool
Implemented in Timezone.
◆ scopeDate()
scopeDate |
( |
|
$scope = null , |
|
|
|
$date = null , |
|
|
|
$includeTime = false |
|
) |
| |
Create \DateTime object with date converted to scope timezone and scope Locale
- Parameters
-
mixed | $scope | Information about scope |
string | integer | \DateTime | array | null | $date | date in UTC |
boolean | $includeTime | flag for including time to date |
- Returns
- \DateTime
Implemented in Timezone.
◆ scopeTimeStamp()
scopeTimeStamp |
( |
|
$scope = null | ) |
|
Get scope timestamp Timestamp will be built with scope timezone settings
- Parameters
-
- Returns
- int
Implemented in Timezone.
The documentation for this interface was generated from the following file: