-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathobject_date_formats.html
43 lines (37 loc) · 1.28 KB
/
object_date_formats.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Object Date Formats</title>
<link rel="stylesheet" href="demo.css">
<script src="./theme.js"></script>
</head>
<body>
<h1><a href="index.html">gridchen Index</a> / Object Date Formats</h1>
<p>
Same as <a href="string_date_formats.html">String Date Formats</a>, but dates are stored as JavaScript Date objects.
</p>
</body>
<script type="module">
import "./gridchen/webcomponent.js"
import {createInteractiveDemoGrid} from "./demo.js"
createInteractiveDemoGrid(
{
title: 'Array of Row Arrays',
type: 'array',
items: {
type: 'array',
items: [ // tuple schema
{title: 'full-date', type: 'object', format:'full-date', width: 100},
{title: 'date-partial-time', type: 'object', format:'date-partial-time', width: 150},
{title: 'date-time', type: 'object', format:'date-time', "period": "SECONDS", width: 220 }
]
}
},
[
[new Date(Date.UTC(2019, 9, 27)), new Date('2019-10-27T01:13Z'), new Date('2019-10-27T01:13:14+02:00')],
['not_a_date', 'not_a_date', 'not_a_date']
]
);
</script>
</html>