Calculate Notice Deadline
legal.notice_deadline_calculate
Overview
You send a start date, a quantity and the counting unit you have already chosen. We walk the Gregorian calendar with only those parameters, plus the weekends and holidays you listed. We do not pick a statute, court calendar or service method. A successful call costs 1 execution credit.
Notice periods are mechanical once the clause parameters are known; mixing in a hidden calendar would look like legal advice.
Reliability
NOTICE_LIMIT_EXCEEDED — trigger: quantity above 10000 or more than 400 holidays; retryable: no; next: lower the count. NOTICE_ROLL_HORIZON_EXCEEDED — trigger: roll finds no eligible date in 400 days; retryable: no; next: change roll or holidays. NOTICE_COUNT_HORIZON_EXCEEDED — trigger: business-day counting walks more than 40000 calendar days; retryable: no; next: lower quantity or holidays.
Context footprint
Dates and holiday lists only. A successful call costs 1 execution credit.
When to use it
When you already know the counting unit, quantity and holiday list and only need the resulting date.
When you still need to decide which statute, court sitting calendar or service method applies.
Powered by java.time Gregorian arithmetic on the dates, weekdays and holidays you supply.
Scope
Non-goals
- Does not select a statute or court calendar
- Does not add service-method days
- Does not determine whether a notice is valid
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| startDate | string | Yes | ISO-8601 calendar date counting starts from, exactly 10 characters. |
| quantity | integer | Yes | Count from 1 through 10001; runtime accepts at most 10000. |
| unit | string | Yes | CALENDAR_DAYS, BUSINESS_DAYS, WEEKS or MONTHS. |
| includeStart | boolean | No | Whether the start date may count as day 1; omit it for false. |
| direction | string | No | FORWARD or BACKWARD; omit it for FORWARD. |
| roll | string | No | NONE, NEXT_BUSINESS_DAY or PREVIOUS_BUSINESS_DAY; omit it for NONE. |
| weekendDays | array | No | Weekdays treated as weekends; omit it for SATURDAY and SUNDAY as a Gregorian convention, not a jurisdiction weekend. |
| holidays | array | No | Holiday dates excluded during business-day counting and roll, 0 through 401 entries; runtime accepts at most 400. Omit it for none. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| nominalDate | string | Yes | ISO date after counting, before roll. |
| finalDate | string | Yes | ISO date after any requested roll. |
| excludedDates | array | Yes | ISO dates skipped as weekends or holidays during business-day counting or roll, empty when none were skipped. |
| excludedCount | integer | Yes | Number of dates in excludedDates. |
| rollReason | string | Yes | NONE or the roll value that moved the nominal date. |
| endOfMonthClamped | boolean | Yes | True when a MONTHS shift landed on a shorter month than the start day. |
| trace | array | Yes | Auditable day-count steps capped at 400 entries, each with date, role and reason. |
| traceTruncated | boolean | Yes | True when later trace rows were dropped after the 400-entry cap. |
| assumptions | array | Yes | Caller-visible mechanical assumptions for this answer, such as default weekend days or a grammar version, never a legal conclusion. |
| limitations | string | Yes | Fixed notice that only supplied parameters are applied and that validity, compliance and enforceability are not determined. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"legal.notice_deadline_calculate","input":{"startDate":"2024-01-01","quantity":10,"unit":"CALENDAR_DAYS"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("legal.notice_deadline_calculate", {"startDate":"2024-01-01","quantity":10,"unit":"CALENDAR_DAYS"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| NOTICE_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| NOTICE_ROLL_HORIZON_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
| NOTICE_COUNT_HORIZON_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not select a statute or court calendar
- Does not add service-method days
- Does not determine whether a notice is valid
- Choosing which counting rule a court would apply
- Looking up public holidays for a jurisdiction
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "legal.notice_deadline_calculate",
"input": {
"startDate": "2024-01-01",
"quantity": 10,
"unit": "CALENDAR_DAYS"
}
}Examples
Ten calendar days after 1 January 2024
{
"startDate": "2024-01-01",
"quantity": 10,
"unit": "CALENDAR_DAYS"
}{
"excludedDates": [],
"endOfMonthClamped": false,
"trace": [
{
"date": "2024-01-01",
"role": "START",
"reason": "Caller start date."
},
{
"date": "2024-01-11",
"role": "NOMINAL",
"reason": "Date after applying unit and includeStart."
}
],
"rollReason": "NONE",
"traceTruncated": false,
"excludedCount": 0,
"nominalDate": "2024-01-11",
"limitations": "Calculations use only the parameters supplied in this call. No implicit legal rule is applied, and the answer does not determine validity, compliance or enforceability.",
"finalDate": "2024-01-11",
"assumptions": [
"weekendDays defaulted to SATURDAY and SUNDAY as a Gregorian calendar convention, not a jurisdiction weekend.",
"Holidays and weekends are exactly the dates and weekdays supplied in this call."
]
}One business day after a Friday with Saturday-Sunday weekends
{
"unit": "BUSINESS_DAYS",
"weekendDays": [
"SATURDAY",
"SUNDAY"
],
"startDate": "2024-01-05",
"quantity": 1
}{
"excludedDates": [
"2024-01-06",
"2024-01-07"
],
"endOfMonthClamped": false,
"trace": [
{
"date": "2024-01-05",
"role": "START",
"reason": "Start is not counted because includeStart is false."
},
{
"date": "2024-01-06",
"role": "EXCLUDED",
"reason": "WEEKEND"
},
{
"date": "2024-01-07",
"role": "EXCLUDED",
"reason": "WEEKEND"
},
{
"date": "2024-01-08",
"role": "COUNTED",
"reason": "Eligible day 1 of 1."
}
],
"rollReason": "NONE",
"traceTruncated": false,
"excludedCount": 2,
"nominalDate": "2024-01-08",
"limitations": "Calculations use only the parameters supplied in this call. No implicit legal rule is applied, and the answer does not determine validity, compliance or enforceability.",
"finalDate": "2024-01-08",
"assumptions": [
"Holidays and weekends are exactly the dates and weekdays supplied in this call."
]
}Recommended use cases
- Count a notice period you already extracted from a clause
- Roll a computed date off a weekend you listed
Avoid for
- Choosing which counting rule a court would apply
- Looking up public holidays for a jurisdiction
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.