File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## Unreleased
9
9
10
+ ## v5.2.0
11
+
12
+ ### Added
13
+
14
+ - Add scalars ` Date ` , ` DateTime ` and ` DateTimeTz `
15
+
10
16
## v5.1.0
11
17
12
18
### Added
Original file line number Diff line number Diff line change @@ -18,6 +18,22 @@ A collection of custom scalar types for usage with https://github.com/webonyx/gr
18
18
You can use the provided Scalars just like any other type in your schema definition.
19
19
Check [ SchemaUsageTest] ( tests/SchemaUsageTest.php ) for an example.
20
20
21
+ ### [ Date] ( src/Date.php )
22
+
23
+ A date string with format ` Y-m-d ` , e.g. ` 2011-05-23 ` .
24
+
25
+ The following conversion applies to all date scalars:
26
+ - Outgoing values can either be valid date strings or ` \DateTimeInterface ` instances.
27
+ - Incoming values must always be valid date strings and will be converted to ` \DateTimeImmutable ` instances.
28
+
29
+ ### [ DateTime] ( src/DateTime.php )
30
+
31
+ A datetime string with format ` Y-m-d H:i:s ` , e.g. ` 2018-05-23 13:43:32 ` .
32
+
33
+ ### [ DateTimeTz] ( src/DateTimeTz.php )
34
+
35
+ A datetime string with format ` Y-m-d\TH:i:s.uP ` , e.g. ` 2020-04-20T16:20:04+04:00 ` , ` 2020-04-20T16:20:04Z ` .
36
+
21
37
### [ Email] ( src/Email.php )
22
38
23
39
A [ RFC 5321] ( https://tools.ietf.org/html/rfc5321 ) compliant email.
Original file line number Diff line number Diff line change 5
5
class DateTimeTz extends DateScalar
6
6
{
7
7
public $ description /** @lang Markdown */
8
- = 'The `DateTime` scalar type represents time data, represented as an ISO-8601 encoded UTC date string . ' ;
8
+ = 'A datetime string with format `Y-m-d\TH:i:s.uP`, e.g. `2020-04-20T16:20:04.000000+04:00` . ' ;
9
9
10
10
protected static function outputFormat (): string
11
11
{
You can’t perform that action at this time.
0 commit comments