-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathtodOverrides.ts
38 lines (34 loc) · 1.07 KB
/
todOverrides.ts
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
/**
* @license
* Copyright 2022-2024 Matter.js Authors
* SPDX-License-Identifier: Apache-2.0
*/
import { FieldElement } from "@matter/model";
import { LocalMatter } from "../local.js";
// Spec lists "Time of Day" fields in prose so we must define manually
LocalMatter.children.push({
tag: "datatype",
name: "tod",
details: "Represents time without a date component.",
children: [
FieldElement({ type: "uint8", name: "hours", constraint: "0 to 23", description: "Hour of the current day." }),
FieldElement({
type: "uint8",
name: "minutes",
constraint: "0 to 59",
description: "Minute of the current hour.",
}),
FieldElement({
type: "uint8",
name: "seconds",
constraint: "0 to 59",
description: "Second of the current minute.",
}),
FieldElement({
type: "uint8",
name: "hundredths",
constraint: "0 to 99",
description: "Hundredth of the current second.",
}),
],
});