Trait Shared
Direct Known Users
Methods summary
abstract public
setTime( integer $hour
, integer $minute
, integer|null $second
= null )
: DateTime|DateTimeImmutable
public
__construct( string $time
= 'now', DateTimeZone|string|null $timezone
= null )
If the time zone is specified as a string a \DateTimeZone instance is created and used instead.
public
format( $format
)
If the instance represents an empty date and the format is DATE or DB, an empty date is returned, respectively "0000-00-00" and "0000-00-00 00:00:00". Note that the time information is discarded for DB. This only apply to DATE and DB formats. For instance RSS will return the following string: "Wed, 30 Nov -0001 00:00:00 +0000".
Magic methods summary
public
format_as_iso8601( void )
: string
format_as_iso8601() Formats the instance according to ISO8601.
public
format_as_rfc822( void )
: string
format_as_rfc822() Formats the instance according to RFC822.
public
format_as_rfc850( void )
: string
format_as_rfc850() Formats the instance according to RFC850.
public
format_as_rfc1036( void )
: string
format_as_rfc1036() Formats the instance according to RFC1036.
public
format_as_rfc1123( void )
: string
format_as_rfc1123() Formats the instance according to RFC1123.
public
format_as_rfc2822( void )
: string
format_as_rfc2822() Formats the instance according to RFC2822.
public
format_as_rfc3339( void )
: string
format_as_rfc3339() Formats the instance according to RFC3339.