Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Calculate Notice Deadline

legal.notice_deadline_calculate

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

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

Note
Applies a caller-declared calendar or business-day count to one start date.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationmath

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input8 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
startDatestringYesISO-8601 calendar date counting starts from, exactly 10 characters.
quantityintegerYesCount from 1 through 10001; runtime accepts at most 10000.
unitstringYesCALENDAR_DAYS, BUSINESS_DAYS, WEEKS or MONTHS.
includeStartbooleanNoWhether the start date may count as day 1; omit it for false.
directionstringNoFORWARD or BACKWARD; omit it for FORWARD.
rollstringNoNONE, NEXT_BUSINESS_DAY or PREVIOUS_BUSINESS_DAY; omit it for NONE.
weekendDaysarrayNoWeekdays treated as weekends; omit it for SATURDAY and SUNDAY as a Gregorian convention, not a jurisdiction weekend.
holidaysarrayNoHoliday dates excluded during business-day counting and roll, 0 through 401 entries; runtime accepts at most 400. Omit it for none.

Output schema

FieldTypeRequiredDescription
nominalDatestringYesISO date after counting, before roll.
finalDatestringYesISO date after any requested roll.
excludedDatesarrayYesISO dates skipped as weekends or holidays during business-day counting or roll, empty when none were skipped.
excludedCountintegerYesNumber of dates in excludedDates.
rollReasonstringYesNONE or the roll value that moved the nominal date.
endOfMonthClampedbooleanYesTrue when a MONTHS shift landed on a shorter month than the start day.
tracearrayYesAuditable day-count steps capped at 400 entries, each with date, role and reason.
traceTruncatedbooleanYesTrue when later trace rows were dropped after the 400-entry cap.
assumptionsarrayYesCaller-visible mechanical assumptions for this answer, such as default weekend days or a grammar version, never a legal conclusion.
limitationsstringYesFixed notice that only supplied parameters are applied and that validity, compliance and enforceability are not determined.

API contract

POST /v1/execute
curl
curl -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"}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
NOTICE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
NOTICE_ROLL_HORIZON_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
NOTICE_COUNT_HORIZON_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "skillKey": "legal.notice_deadline_calculate",
  "input": {
    "startDate": "2024-01-01",
    "quantity": 10,
    "unit": "CALENDAR_DAYS"
  }
}

Examples

Ten calendar days after 1 January 2024

Inputjson
{
  "startDate": "2024-01-01",
  "quantity": 10,
  "unit": "CALENDAR_DAYS"
}
Expected outputjson
{
  "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."
  ]
}
Tip
includeStart stays false, so the answer is 11 January.

One business day after a Friday with Saturday-Sunday weekends

Inputjson
{
  "unit": "BUSINESS_DAYS",
  "weekendDays": [
    "SATURDAY",
    "SUNDAY"
  ],
  "startDate": "2024-01-05",
  "quantity": 1
}
Expected outputjson
{
  "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."
  ]
}
Tip
Friday is not counted and Saturday-Sunday are excluded, so the answer is Monday.
  • 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

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.

Tags

validationdate-timelegal