diff --git a/definitions/taurus/date/data_types/date.proto.json b/definitions/taurus/date/data_types/date.proto.json new file mode 100644 index 0000000..da4ce1f --- /dev/null +++ b/definitions/taurus/date/data_types/date.proto.json @@ -0,0 +1,23 @@ +{ + "identifier": "DATE", + "name": [ + { + "code": "en-US", + "content": "Date" + } + ], + "alias": [ + { + "code": "en-US", + "content": "date;day;day of month;calendar day" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Date" + } + ], + "type": "number", + "rules": [] +} diff --git a/definitions/taurus/date/data_types/hour.proto.json b/definitions/taurus/date/data_types/hour.proto.json new file mode 100644 index 0000000..4ce4652 --- /dev/null +++ b/definitions/taurus/date/data_types/hour.proto.json @@ -0,0 +1,31 @@ +{ + "identifier": "HOUR", + "name": [ + { + "code": "en-US", + "content": "Hour" + } + ], + "alias": [ + { + "code": "en-US", + "content": "hour;hours;hr;time" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Hour" + } + ], + "type": "number", + "rules": [ + { + "number_range": { + "from": 0, + "to": 23, + "steps": 1 + } + } + ] +} diff --git a/definitions/taurus/date/data_types/minute.proto.json b/definitions/taurus/date/data_types/minute.proto.json new file mode 100644 index 0000000..78c6039 --- /dev/null +++ b/definitions/taurus/date/data_types/minute.proto.json @@ -0,0 +1,31 @@ +{ + "identifier": "MINUTE", + "name": [ + { + "code": "en-US", + "content": "Minute" + } + ], + "alias": [ + { + "code": "en-US", + "content": "minute;minutes;min;time" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Minute" + } + ], + "type": "number", + "rules": [ + { + "number_range": { + "from": 0, + "to": 59, + "steps": 1 + } + } + ] +} diff --git a/definitions/taurus/date/data_types/month.proto.json b/definitions/taurus/date/data_types/month.proto.json new file mode 100644 index 0000000..3ee3c46 --- /dev/null +++ b/definitions/taurus/date/data_types/month.proto.json @@ -0,0 +1,23 @@ +{ + "identifier": "MONTH", + "name": [ + { + "code": "en-US", + "content": "Month" + } + ], + "alias": [ + { + "code": "en-US", + "content": "month;months;month of year;calendar month" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Month" + } + ], + "type": "'JAN' | 'FEB' | 'MAR' | 'APR' | 'MAY' | 'JUN' | 'JUL' | 'AUG' | 'SEP' | 'OCT' | 'NOV' | 'DEC'", + "rules": [] +} diff --git a/definitions/taurus/date/module.json b/definitions/taurus/date/module.json new file mode 100644 index 0000000..d6517e8 --- /dev/null +++ b/definitions/taurus/date/module.json @@ -0,0 +1,18 @@ +{ + "identifier": "taurus-date", + "name": [ + { + "code": "en-US", + "content": "Date" + } + ], + "description": [ + { + "code": "en-US", + "content": "Work with Dates." + } + ], + "documentation": "", + "author": "CodeZero", + "icon": "tabler:calendar" +} diff --git a/definitions/taurus/date/runtime_functions/std_date_format.proto.json b/definitions/taurus/date/runtime_functions/std_date_format.proto.json new file mode 100644 index 0000000..4b442ea --- /dev/null +++ b/definitions/taurus/date/runtime_functions/std_date_format.proto.json @@ -0,0 +1,72 @@ +{ + "runtimeName": "std::date::format", + "runtimeParameterDefinitions": [ + { + "runtimeName": "date", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Date" + } + ], + "description": [ + { + "code": "en-US", + "content": "The date that will be formatted." + } + ], + "documentation": [] + }, + { + "runtimeName": "pattern", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Pattern" + } + ], + "description": [ + { + "code": "en-US", + "content": "The pattern used to format the date, for example DD:MM:YYYY or YY:MM:DD." + } + ], + "documentation": [] + } + ], + "throwsError": true, + "name": [ + { + "code": "en-US", + "content": "Format Date" + } + ], + "description": [ + { + "code": "en-US", + "content": "Converts a date into a formatted text using the given pattern. Throws an error if the pattern is invalid." + } + ], + "documentation": [], + "alias": [ + { + "code": "en-US", + "content": "format;pattern;stringify;to text;display;date;time;std" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Format ${date} as ${pattern}" + } + ], + "deprecationMessage": [], + "displayIcon": "tabler:calendar-cog", + "signature": "(date: DATE, pattern: TEXT): TEXT", + "linkedDataTypeIdentifiers": [ + "DATE", + "TEXT" + ] +} diff --git a/definitions/taurus/date/runtime_functions/std_date_from.proto.json b/definitions/taurus/date/runtime_functions/std_date_from.proto.json new file mode 100644 index 0000000..c6b6ad5 --- /dev/null +++ b/definitions/taurus/date/runtime_functions/std_date_from.proto.json @@ -0,0 +1,143 @@ +{ + "runtimeName": "std::date::from", + "runtimeParameterDefinitions": [ + { + "runtimeName": "year", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Year" + } + ], + "description": [ + { + "code": "en-US", + "content": "The year of the date, for example 2026." + } + ], + "documentation": [] + }, + { + "runtimeName": "month", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Month" + } + ], + "description": [ + { + "code": "en-US", + "content": "The month of the date." + } + ], + "documentation": [] + }, + { + "runtimeName": "day", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Day" + } + ], + "description": [ + { + "code": "en-US", + "content": "The day of the month, ranging from 1 to 31." + } + ], + "documentation": [] + }, + { + "runtimeName": "hour", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Hour" + } + ], + "description": [ + { + "code": "en-US", + "content": "The hour of the day, ranging from 0 to 23." + } + ], + "documentation": [] + }, + { + "runtimeName": "minute", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Minute" + } + ], + "description": [ + { + "code": "en-US", + "content": "The minute of the hour, ranging from 0 to 59." + } + ], + "documentation": [] + }, + { + "runtimeName": "second", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Second" + } + ], + "description": [ + { + "code": "en-US", + "content": "The second of the minute, ranging from 0 to 59." + } + ], + "documentation": [] + } + ], + "throwsError": true, + "name": [ + { + "code": "en-US", + "content": "Date from Components" + } + ], + "description": [ + { + "code": "en-US", + "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." + } + ], + "documentation": [], + "alias": [ + { + "code": "en-US", + "content": "from;create;build;construct;date;year;month;day;time;std" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Date ${day} ${month} ${year} at ${hour}:${minute}:${second}" + } + ], + "deprecationMessage": [], + "displayIcon": "tabler:calendar-plus", + "signature": "(year: NUMBER, month: MONTH, day: NUMBER, hour: HOUR, minute: MINUTE, second: NUMBER): DATE", + "linkedDataTypeIdentifiers": [ + "DATE", + "NUMBER", + "MONTH", + "HOUR", + "MINUTE" + ] +} diff --git a/definitions/taurus/date/runtime_functions/std_date_from_text.proto.json b/definitions/taurus/date/runtime_functions/std_date_from_text.proto.json new file mode 100644 index 0000000..5ba871f --- /dev/null +++ b/definitions/taurus/date/runtime_functions/std_date_from_text.proto.json @@ -0,0 +1,55 @@ +{ + "runtimeName": "std::date::from_text", + "runtimeParameterDefinitions": [ + { + "runtimeName": "value", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Value" + } + ], + "description": [ + { + "code": "en-US", + "content": "The textual representation of the date, for example an ISO 8601 string like 2026-07-28T10:15:30Z." + } + ], + "documentation": [] + } + ], + "throwsError": true, + "name": [ + { + "code": "en-US", + "content": "Date from Text" + } + ], + "description": [ + { + "code": "en-US", + "content": "Parses a date from its textual representation. Throws an error if the text cannot be parsed into a valid date." + } + ], + "documentation": [], + "alias": [ + { + "code": "en-US", + "content": "from text;parse;string;iso;from;date;time;std" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Date from text ${value}" + } + ], + "deprecationMessage": [], + "displayIcon": "tabler:calendar-plus", + "signature": "(value: TEXT): DATE", + "linkedDataTypeIdentifiers": [ + "DATE", + "TEXT" + ] +} diff --git a/definitions/taurus/date/runtime_functions/std_date_from_unix.proto.json b/definitions/taurus/date/runtime_functions/std_date_from_unix.proto.json new file mode 100644 index 0000000..e08714d --- /dev/null +++ b/definitions/taurus/date/runtime_functions/std_date_from_unix.proto.json @@ -0,0 +1,55 @@ +{ + "runtimeName": "std::date::from_unix", + "runtimeParameterDefinitions": [ + { + "runtimeName": "value", + "defaultValue": null, + "name": [ + { + "code": "en-US", + "content": "Unix Timestamp" + } + ], + "description": [ + { + "code": "en-US", + "content": "The Unix timestamp in seconds since the Unix epoch (1970-01-01T00:00:00Z)." + } + ], + "documentation": [] + } + ], + "throwsError": false, + "name": [ + { + "code": "en-US", + "content": "Date from Unix Timestamp" + } + ], + "description": [ + { + "code": "en-US", + "content": "Creates a date from a Unix timestamp given in seconds since the Unix epoch." + } + ], + "documentation": [], + "alias": [ + { + "code": "en-US", + "content": "from unix;unix;timestamp;epoch;from;date;time;std" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Date from Unix timestamp ${value}" + } + ], + "deprecationMessage": [], + "displayIcon": "tabler:calendar-plus", + "signature": "(value: NUMBER): DATE", + "linkedDataTypeIdentifiers": [ + "DATE", + "NUMBER" + ] +} diff --git a/definitions/taurus/date/runtime_functions/std_date_now.proto.json b/definitions/taurus/date/runtime_functions/std_date_now.proto.json new file mode 100644 index 0000000..a9a505b --- /dev/null +++ b/definitions/taurus/date/runtime_functions/std_date_now.proto.json @@ -0,0 +1,36 @@ +{ + "runtimeName": "std::date::now", + "runtimeParameterDefinitions": [], + "throwsError": false, + "name": [ + { + "code": "en-US", + "content": "Now" + } + ], + "description": [ + { + "code": "en-US", + "content": "Returns the current date and time as a date." + } + ], + "documentation": [], + "alias": [ + { + "code": "en-US", + "content": "now;current;today;current date;current time;date;time;std" + } + ], + "displayMessage": [ + { + "code": "en-US", + "content": "Now" + } + ], + "deprecationMessage": [], + "displayIcon": "tabler:calendar", + "signature": "(): DATE", + "linkedDataTypeIdentifiers": [ + "DATE" + ] +}