DateTime ​
- Type
- Class
- Namespace
- craft\gql\types
- Inherits
- craft\gql\types\DateTime »
GraphQL\Type\Definition\ScalarType
- Implements
- craft\gql\base\SingularTypeInterface
- Since
- 3.3.0
Class DateTime implements the Datetime scalar type for GraphQL.
Public Properties ​
Property | Description |
---|---|
description | string |
name | string |
setToSystemTimeZone | boolean – Whether parsed dates should be set to the system time zone |
description
​
- Type
- string
- Default value
'The
DateTimescalar type represents a point in time.'
name
​
- Type
- string
- Default value
'DateTime'
setToSystemTimeZone
​
- Type
- boolean
- Default value
true
- Since
- 4.5.11
Whether parsed dates should be set to the system time zone
Public Methods ​
Method | Description |
---|---|
getName() | |
getType() | Returns a singleton instance to ensure one type per schema. |
parseLiteral() | |
parseValue() | |
serialize() |
getName()
​
Returns ​
getType()
​
Returns a singleton instance to ensure one type per schema.
Returns ​
parseLiteral()
​
Arguments ​
$valueNode
$variables
parseValue()
​
Arguments ​
$value
serialize()
​
Arguments ​
$value