Skip to content

Commit 154ad45

Browse files
committed
docs: fix date and time example
1 parent 6873dcc commit 154ad45

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,18 @@ var input = """(Age ^^ [20, 30, 40]) && (BirthMonth ^^* ["January", "February",
134134
var input = """""""""Title == """"lamb is great on a "gee-ro" not a "gy-ro" sandwich"""" """"""""";
135135
```
136136

137-
* Dates and times use ISO 8601 format:
137+
* Dates and times use ISO 8601 format and should be surrounded by double quotes:
138138

139-
* `DateOnly`: `var filterInput = "Birthday == 2022-07-01";`
139+
* `DateOnly`: `var filterInput = """Birthday == "2022-07-01" """;`
140140
* `DateTimeOffset`:
141-
* `var filterInput = "Birthday == 2022-07-01T00:00:03Z";`
142-
* `DateTime`: `var filterInput = "Birthday == 2022-07-01";`
143-
* `var filterInput = "Birthday == 2022-07-01T00:00:03";`
144-
* `var filterInput = "Birthday == 2022-07-01T00:00:03+01:00";`
141+
* `var filterInput = """Birthday == "2022-07-01T00:00:03Z" """;`
142+
* `DateTime`: `var filterInput = """Birthday == "2022-07-01" """;`
143+
* `var filterInput = """Birthday == "2022-07-01T00:00:03" """;`
144+
* `var filterInput = """Birthday == "2022-07-01T00:00:03+01:00" """;`
145145

146146
* `TimeOnly`:
147-
* `var filterInput = "Time == 12:30:00";`
148-
* `var filterInput = "Time == 12:30:00.678722";`
147+
* `var filterInput = """Time == "12:30:00" """;`
148+
* `var filterInput = """Time == "12:30:00.678722" """;`
149149

150150
* `bool` properties need to use `== true`, `== false`, or the same using the `!=` operator. they can not be standalone properies:
151151

@@ -155,7 +155,7 @@ var input = """(Age ^^ [20, 30, 40]) && (BirthMonth ^^* ["January", "February",
155155
#### Complex Example
156156

157157
```c#
158-
var input = """(Title == "lamb" && ((Age >= 25 && Rating < 4.5) || (SpecificDate <= 2022-07-01T00:00:03Z && Time == 00:00:03)) && (Favorite == true || Email.Value _= "hello@gmail.com"))""";
158+
var input = """(Title == "lamb" && ((Age >= 25 && Rating < 4.5) || (SpecificDate <= "2022-07-01T00:00:03Z" && Time == "00:00:03")) && (Favorite == true || Email.Value _= "hello@gmail.com"))""";
159159
```
160160

161161
#### Filtering Collections

0 commit comments

Comments
 (0)