DateTimeAspect implements AspectInterface

Read onlyYes
FinalYes

The Aspect is usually available as "date.*" properties in the Context.

Contains the current time + date + timezone, and needs a DateTimeImmutable object

Allowed properties:

  • timestamp - unix timestamp number
  • timezone - America/Los_Angeles
  • iso - datetime as string in ISO 8601 format, e.g. 2004-02-12T15:19:21+00:00
  • full - the DateTimeImmutable object
  • accessTime - 60 seconds precision timestamp

Table of Contents

Interfaces

AspectInterface
Interface AspectInterface Think of an aspect like a property bag

Methods

__construct()  : mixed
get()  : mixed
Fetch a property of the date time object or the object itself ("full").
getDateTime()  : DateTimeImmutable
Return the full date time object

Methods

__construct()

public __construct(DateTimeImmutable $dateTimeObject) : mixed
Parameters
$dateTimeObject : DateTimeImmutable

getDateTime()

Return the full date time object

public getDateTime() : DateTimeImmutable
Return values
DateTimeImmutable

        
On this page

Search results