You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,6 +227,38 @@ The following object…
227
227
a=9007199254740992n
228
228
```
229
229
230
+
## Dates
231
+
232
+
Dates are stringified to their ISO 8601 string representation. If a date is at midnight UTC, the time component is omitted. If the year exceeds 9999, there may exist a `+` prefix, which needs to be percent-encoded.
233
+
234
+
The following objects…
235
+
236
+
```js
237
+
{
238
+
a:newDate('2024-10-27T00:00:00.000Z')
239
+
}
240
+
241
+
{
242
+
b:newDate('2024-10-27T12:34:56.789Z')
243
+
}
244
+
245
+
{
246
+
c:newDate('+10000-01-01T00:00:00.000Z')
247
+
}
248
+
```
249
+
250
+
…are encoded into the following query strings:
251
+
252
+
```
253
+
a=2024-10-27
254
+
255
+
b=2024-10-27T12:34:56.789Z
256
+
257
+
c=%2B010000-01-01
258
+
```
259
+
260
+
Unlike in strings, colons are not escaped in dates, since they're unlikely to be misread as a property name separator when judged at a glance.
0 commit comments