RetailCRM API Client

DateTimeTransformer

Class DateTimeTransformer

Tags
category

DateTimeTransformer

Table of Contents

Constants

FORMAT_DATE  = 'Y-m-d'
FORMAT_DATE_TIME  = 'Y-m-d H:i:s'
FORMAT_TIME  = 'H:i:s'

Methods

create()  : DateTime
Converts provided date and time string to DateTime from format used in the system.
createDate()  : DateTime
Converts provided date string to DateTime from format used in the system.
createTime()  : DateTime
Converts provided time string to DateTime from format used in the system.
format()  : string
Converts provided DateTimeInterface instance to date and time format used in the system.
formatDate()  : string
Converts provided DateTimeInterface instance to date format used in the system.
formatTime()  : string
Converts provided DateTimeInterface instance to time format used in the system.

Constants

Methods

create()

Converts provided date and time string to DateTime from format used in the system.

public static create(string $dateTime) : DateTime
Parameters
$dateTime : string
Tags
throws
InvalidArgumentException
Return values
DateTime

createDate()

Converts provided date string to DateTime from format used in the system.

public static createDate(string $date) : DateTime
Parameters
$date : string
Tags
throws
InvalidArgumentException
Return values
DateTime

createTime()

Converts provided time string to DateTime from format used in the system.

public static createTime(string $time) : DateTime
Parameters
$time : string
Tags
throws
InvalidArgumentException
Return values
DateTime

format()

Converts provided DateTimeInterface instance to date and time format used in the system.

public static format(DateTimeInterface $dateTime) : string
Parameters
$dateTime : DateTimeInterface
Return values
string

formatDate()

Converts provided DateTimeInterface instance to date format used in the system.

public static formatDate(DateTimeInterface $dateTime) : string
Parameters
$dateTime : DateTimeInterface
Return values
string

formatTime()

Converts provided DateTimeInterface instance to time format used in the system.

public static formatTime(DateTimeInterface $dateTime) : string
Parameters
$dateTime : DateTimeInterface
Return values
string

        
On this page

Search results