Skip to content

Commit 67aff71

Browse files
committed
feat: add proto definitions for date manipulation functions
1 parent a8395a2 commit 67aff71

6 files changed

Lines changed: 379 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"identifier": "taurus-date",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Date"
7+
}
8+
],
9+
"description": [
10+
{
11+
"code": "en-US",
12+
"content": "Work with Dates."
13+
}
14+
],
15+
"documentation": "",
16+
"author": "CodeZero",
17+
"icon": "tabler:calendar"
18+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"runtimeName": "std::date::format",
3+
"runtimeParameterDefinitions": [
4+
{
5+
"runtimeName": "date",
6+
"defaultValue": null,
7+
"name": [
8+
{
9+
"code": "en-US",
10+
"content": "Date"
11+
}
12+
],
13+
"description": [
14+
{
15+
"code": "en-US",
16+
"content": "The date that will be formatted."
17+
}
18+
],
19+
"documentation": []
20+
},
21+
{
22+
"runtimeName": "pattern",
23+
"defaultValue": null,
24+
"name": [
25+
{
26+
"code": "en-US",
27+
"content": "Pattern"
28+
}
29+
],
30+
"description": [
31+
{
32+
"code": "en-US",
33+
"content": "The pattern used to format the date, for example DD:MM:YYYY or YY:MM:DD."
34+
}
35+
],
36+
"documentation": []
37+
}
38+
],
39+
"throwsError": true,
40+
"name": [
41+
{
42+
"code": "en-US",
43+
"content": "Format Date"
44+
}
45+
],
46+
"description": [
47+
{
48+
"code": "en-US",
49+
"content": "Converts a date into a formatted text using the given pattern. Throws an error if the pattern is invalid."
50+
}
51+
],
52+
"documentation": [],
53+
"alias": [
54+
{
55+
"code": "en-US",
56+
"content": "format;pattern;stringify;to text;display;date;time;std"
57+
}
58+
],
59+
"displayMessage": [
60+
{
61+
"code": "en-US",
62+
"content": "Format ${date} as ${pattern}"
63+
}
64+
],
65+
"deprecationMessage": [],
66+
"displayIcon": "tabler:calendar-cog",
67+
"signature": "(date: DATE, pattern: TEXT): TEXT",
68+
"linkedDataTypeIdentifiers": [
69+
"DATE",
70+
"TEXT"
71+
]
72+
}
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
{
2+
"runtimeName": "std::date::from",
3+
"runtimeParameterDefinitions": [
4+
{
5+
"runtimeName": "year",
6+
"defaultValue": null,
7+
"name": [
8+
{
9+
"code": "en-US",
10+
"content": "Year"
11+
}
12+
],
13+
"description": [
14+
{
15+
"code": "en-US",
16+
"content": "The year of the date, for example 2026."
17+
}
18+
],
19+
"documentation": []
20+
},
21+
{
22+
"runtimeName": "month",
23+
"defaultValue": null,
24+
"name": [
25+
{
26+
"code": "en-US",
27+
"content": "Month"
28+
}
29+
],
30+
"description": [
31+
{
32+
"code": "en-US",
33+
"content": "The month of the date."
34+
}
35+
],
36+
"documentation": []
37+
},
38+
{
39+
"runtimeName": "day",
40+
"defaultValue": null,
41+
"name": [
42+
{
43+
"code": "en-US",
44+
"content": "Day"
45+
}
46+
],
47+
"description": [
48+
{
49+
"code": "en-US",
50+
"content": "The day of the month, ranging from 1 to 31."
51+
}
52+
],
53+
"documentation": []
54+
},
55+
{
56+
"runtimeName": "hour",
57+
"defaultValue": null,
58+
"name": [
59+
{
60+
"code": "en-US",
61+
"content": "Hour"
62+
}
63+
],
64+
"description": [
65+
{
66+
"code": "en-US",
67+
"content": "The hour of the day, ranging from 0 to 23."
68+
}
69+
],
70+
"documentation": []
71+
},
72+
{
73+
"runtimeName": "minute",
74+
"defaultValue": null,
75+
"name": [
76+
{
77+
"code": "en-US",
78+
"content": "Minute"
79+
}
80+
],
81+
"description": [
82+
{
83+
"code": "en-US",
84+
"content": "The minute of the hour, ranging from 0 to 59."
85+
}
86+
],
87+
"documentation": []
88+
},
89+
{
90+
"runtimeName": "second",
91+
"defaultValue": null,
92+
"name": [
93+
{
94+
"code": "en-US",
95+
"content": "Second"
96+
}
97+
],
98+
"description": [
99+
{
100+
"code": "en-US",
101+
"content": "The second of the minute, ranging from 0 to 59."
102+
}
103+
],
104+
"documentation": []
105+
}
106+
],
107+
"throwsError": true,
108+
"name": [
109+
{
110+
"code": "en-US",
111+
"content": "Date from Components"
112+
}
113+
],
114+
"description": [
115+
{
116+
"code": "en-US",
117+
"content": "Creates a date from the given year, month, day, hour, minute and second. Throws an error if the combination does not represent a valid date."
118+
}
119+
],
120+
"documentation": [],
121+
"alias": [
122+
{
123+
"code": "en-US",
124+
"content": "from;create;build;construct;date;year;month;day;time;std"
125+
}
126+
],
127+
"displayMessage": [
128+
{
129+
"code": "en-US",
130+
"content": "Date ${day} ${month} ${year} at ${hour}:${minute}:${second}"
131+
}
132+
],
133+
"deprecationMessage": [],
134+
"displayIcon": "tabler:calendar-plus",
135+
"signature": "(year: NUMBER, month: MONTH, day: NUMBER, hour: HOUR, minute: MINUTE, second: NUMBER): DATE",
136+
"linkedDataTypeIdentifiers": [
137+
"DATE",
138+
"NUMBER",
139+
"MONTH",
140+
"HOUR",
141+
"MINUTE"
142+
]
143+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"runtimeName": "std::date::from_text",
3+
"runtimeParameterDefinitions": [
4+
{
5+
"runtimeName": "value",
6+
"defaultValue": null,
7+
"name": [
8+
{
9+
"code": "en-US",
10+
"content": "Value"
11+
}
12+
],
13+
"description": [
14+
{
15+
"code": "en-US",
16+
"content": "The textual representation of the date, for example an ISO 8601 string like 2026-07-28T10:15:30Z."
17+
}
18+
],
19+
"documentation": []
20+
}
21+
],
22+
"throwsError": true,
23+
"name": [
24+
{
25+
"code": "en-US",
26+
"content": "Date from Text"
27+
}
28+
],
29+
"description": [
30+
{
31+
"code": "en-US",
32+
"content": "Parses a date from its textual representation. Throws an error if the text cannot be parsed into a valid date."
33+
}
34+
],
35+
"documentation": [],
36+
"alias": [
37+
{
38+
"code": "en-US",
39+
"content": "from text;parse;string;iso;from;date;time;std"
40+
}
41+
],
42+
"displayMessage": [
43+
{
44+
"code": "en-US",
45+
"content": "Date from text ${value}"
46+
}
47+
],
48+
"deprecationMessage": [],
49+
"displayIcon": "tabler:calendar-plus",
50+
"signature": "(value: TEXT): DATE",
51+
"linkedDataTypeIdentifiers": [
52+
"DATE",
53+
"TEXT"
54+
]
55+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"runtimeName": "std::date::from_unix",
3+
"runtimeParameterDefinitions": [
4+
{
5+
"runtimeName": "value",
6+
"defaultValue": null,
7+
"name": [
8+
{
9+
"code": "en-US",
10+
"content": "Unix Timestamp"
11+
}
12+
],
13+
"description": [
14+
{
15+
"code": "en-US",
16+
"content": "The Unix timestamp in seconds since the Unix epoch (1970-01-01T00:00:00Z)."
17+
}
18+
],
19+
"documentation": []
20+
}
21+
],
22+
"throwsError": false,
23+
"name": [
24+
{
25+
"code": "en-US",
26+
"content": "Date from Unix Timestamp"
27+
}
28+
],
29+
"description": [
30+
{
31+
"code": "en-US",
32+
"content": "Creates a date from a Unix timestamp given in seconds since the Unix epoch."
33+
}
34+
],
35+
"documentation": [],
36+
"alias": [
37+
{
38+
"code": "en-US",
39+
"content": "from unix;unix;timestamp;epoch;from;date;time;std"
40+
}
41+
],
42+
"displayMessage": [
43+
{
44+
"code": "en-US",
45+
"content": "Date from Unix timestamp ${value}"
46+
}
47+
],
48+
"deprecationMessage": [],
49+
"displayIcon": "tabler:calendar-plus",
50+
"signature": "(value: NUMBER): DATE",
51+
"linkedDataTypeIdentifiers": [
52+
"DATE",
53+
"NUMBER"
54+
]
55+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"runtimeName": "std::date::now",
3+
"runtimeParameterDefinitions": [],
4+
"throwsError": false,
5+
"name": [
6+
{
7+
"code": "en-US",
8+
"content": "Now"
9+
}
10+
],
11+
"description": [
12+
{
13+
"code": "en-US",
14+
"content": "Returns the current date and time as a date."
15+
}
16+
],
17+
"documentation": [],
18+
"alias": [
19+
{
20+
"code": "en-US",
21+
"content": "now;current;today;current date;current time;date;time;std"
22+
}
23+
],
24+
"displayMessage": [
25+
{
26+
"code": "en-US",
27+
"content": "Now"
28+
}
29+
],
30+
"deprecationMessage": [],
31+
"displayIcon": "tabler:calendar",
32+
"signature": "(): DATE",
33+
"linkedDataTypeIdentifiers": [
34+
"DATE"
35+
]
36+
}

0 commit comments

Comments
 (0)