← All procedures
ics.occurrences
Give the occurrences of the events of an iCalendar text in a time window, recurrences included
CLI- Package
- @procedures/ics · README
- Path
["ics","occurrences"]- CLI
mark ics occurrences --text <string> --from <string> --to <string>- As data
{"$proc":["ics","occurrences"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/ics/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["ics","occurrences"], { text: "<text>", from: "<from>", to: "<to>" });
console.log(JSON.stringify(result));From the command line
$ mark ics occurrences --text <string> --from <string> --to <string>
As data, in a program
{
"$proc": ["ics", "occurrences"],
"input": { "text": "<text>", "from": "<from>", "to": "<to>" }
}Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "The iCalendar text"
},
"from": {
"type": "string",
"description": "The start of the window (ISO 8601)"
},
"to": {
"type": "string",
"description": "The end of the window (ISO 8601)"
}
},
"required": [
"text",
"from",
"to"
]
},
"output": {
"type": "object",
"properties": {
"occurrences": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uid": {
"type": "string"
},
"summary": {
"type": "string"
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"allDay": {
"type": "boolean"
},
"location": {
"type": "string"
}
},
"required": [
"uid",
"summary",
"start",
"end",
"allDay"
],
"additionalProperties": false
}
}
},
"required": [
"occurrences"
],
"additionalProperties": false
}
}