Skip to content

Commit 96cc958

Browse files
authored
Merge pull request #387 from code0-tech/feat/#376
Introduce Date type
2 parents f3e33ed + 67aff71 commit 96cc958

10 files changed

Lines changed: 487 additions & 0 deletions
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"identifier": "DATE",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Date"
7+
}
8+
],
9+
"alias": [
10+
{
11+
"code": "en-US",
12+
"content": "date;day;day of month;calendar day"
13+
}
14+
],
15+
"displayMessage": [
16+
{
17+
"code": "en-US",
18+
"content": "Date"
19+
}
20+
],
21+
"type": "number",
22+
"rules": []
23+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"identifier": "HOUR",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Hour"
7+
}
8+
],
9+
"alias": [
10+
{
11+
"code": "en-US",
12+
"content": "hour;hours;hr;time"
13+
}
14+
],
15+
"displayMessage": [
16+
{
17+
"code": "en-US",
18+
"content": "Hour"
19+
}
20+
],
21+
"type": "number",
22+
"rules": [
23+
{
24+
"number_range": {
25+
"from": 0,
26+
"to": 23,
27+
"steps": 1
28+
}
29+
}
30+
]
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"identifier": "MINUTE",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Minute"
7+
}
8+
],
9+
"alias": [
10+
{
11+
"code": "en-US",
12+
"content": "minute;minutes;min;time"
13+
}
14+
],
15+
"displayMessage": [
16+
{
17+
"code": "en-US",
18+
"content": "Minute"
19+
}
20+
],
21+
"type": "number",
22+
"rules": [
23+
{
24+
"number_range": {
25+
"from": 0,
26+
"to": 59,
27+
"steps": 1
28+
}
29+
}
30+
]
31+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"identifier": "MONTH",
3+
"name": [
4+
{
5+
"code": "en-US",
6+
"content": "Month"
7+
}
8+
],
9+
"alias": [
10+
{
11+
"code": "en-US",
12+
"content": "month;months;month of year;calendar month"
13+
}
14+
],
15+
"displayMessage": [
16+
{
17+
"code": "en-US",
18+
"content": "Month"
19+
}
20+
],
21+
"type": "'JAN' | 'FEB' | 'MAR' | 'APR' | 'MAY' | 'JUN' | 'JUL' | 'AUG' | 'SEP' | 'OCT' | 'NOV' | 'DEC'",
22+
"rules": []
23+
}
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+
}

0 commit comments

Comments
 (0)