Skip to content

Commit 64615c9

Browse files
andimareksungam3rdondonz
authored
add locale date scalar (graphql#20)
* add locale date scalar * ignore github username for spelling * fix build problems * fix build problems * Update scalars/contributed/andimarek/local-date.md Co-authored-by: Ivan Maximov <[email protected]> * Update scalars/contributed/andimarek/local-date.md Co-authored-by: Ivan Maximov <[email protected]> * Update scalars/contributed/andimarek/local-date.md Co-authored-by: Ivan Maximov <[email protected]> * improve examples * Update scalars/contributed/andimarek/local-date.md Co-authored-by: dondonz <[email protected]> * Update scalars/contributed/andimarek/local-date.md Co-authored-by: dondonz <[email protected]> Co-authored-by: Ivan Maximov <[email protected]> Co-authored-by: dondonz <[email protected]>
1 parent caaa071 commit 64615c9

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!-- cspell:ignore andimarek -->
2+
3+
# LocalDate — GraphQL Custom Scalar
4+
5+
"Author - andimarek"
6+
7+
"Date - 2023-01-18"
8+
9+
This is a String-based Scalar.
10+
11+
**License and Copyright**
12+
13+
Copyright © GraphQL contributors. This specification is licensed under
14+
[OWFa 1.0](https://www.openwebfoundation.org/the-agreements/the-owf-1-0-agreements-granted-claims/owfa-1-0).
15+
16+
# Overview
17+
18+
This scalar represents a date without a time-zone in the
19+
[ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) calendar system.
20+
21+
The pattern is "YYYY-MM-DD" with "YYYY" representing the year, "MM" the month
22+
and "DD" the day.
23+
24+
Valid examples are "1983-10-20" or "2023-04-01". An invalid example would be
25+
"2011-13-10" because there isn't a 13th month in a year.
26+
27+
The prefix "Local" comes from the fact that without a time-zone it is not a
28+
specific point in time, but rather expresses a "local point of view". A popular
29+
use case for using this scalar are birthdays for example, which are normally not
30+
stored with a specific timezone.
31+
32+
Because this scalar depends on the ISO-8601 calendar it is not recommended to
33+
use for dates before the year 1582.
34+
35+
# Name
36+
37+
The recommended name is "LocalDate".
38+
39+
# Result spec
40+
41+
Every result must follow the pattern "YYYY-MM-DD" as described above.
42+
43+
# Input spec
44+
45+
Every input must follow the pattern "YYYY-MM-DD" as described above.
46+
47+
# References
48+
49+
[ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)

0 commit comments

Comments
 (0)