com.tilwhen/tilwhen

tilwhen date engine

Deterministic date arithmetic with auditable receipts: business days, due dates, holidays.

1.0.1
Version
remote
Transport
9
Tools

Security review

Review passed

Reviewed 1d ago.

  • tools: 9 tools scanned
  • metadata: scanned

No findings.

Tools (9)

  • parse_date_query

    Parses queries like "90 business days from today in uganda" into a normalized operation, answers it, and returns the auditable receipt. Ambiguous dates (03/04/2027) return needsClarification instead of a guess.

  • add_days

    The date N whole calendar days after a date (exclusive counting: the start date is day 0). Omit date for today in tz. For working days use business_days; for the gap between two dates use days_between.

  • subtract_days

    The date N whole calendar days before a date (exclusive counting: the start date is day 0). Omit date for today in tz. For working days use business_days; for the gap between two dates use days_between.

  • days_between

    Signed whole calendar days from the from date to the to date, midnight to midnight in tz: positive when to is later, negative when it is earlier. Endpoints are exclusive, so this is the gap and consecutive dates are 1 apart. Either date may be "today", resolved in tz. For working days between two dates use business_days; to move a date by N days use add_days or subtract_days.

  • business_days

    Span mode (from+to): business days between two dates, exclusive of the start day, inclusive of the end day. Add mode (days, optional date): the date N business days away. Passing from or to selects span mode and needs both; days and date are then ignored, so add mode takes its start date in date, not from. Optional holiday jurisdiction or custom calendar, and a selectable working week. For calendar days use add_days, subtract_days or days_between.

  • invoice_due

    Due date for Net-N payment terms (calendar days, invoice date = day 0). Optional roll-forward past weekends and, with a jurisdiction or custom calendar, public holidays.

  • next_occurrence

    The next occurrence strictly after the base date (default today) of either a tracked event slug (e.g. "christmas") or a weekday (0 = Sunday .. 6 = Saturday). Provide exactly one of event/weekday.

  • holidays

    Observed public holidays with the nominal (legal) date and status: rule (statutory) or declared (officially declared for that year). Declared-only holidays are omitted for undeclared years, with a holiday_data_incomplete warning.

  • explain

    Runs any operation and returns the receipt plus human-readable derivation steps. Set op, then pass the fields that operation's own tool takes. Use it when the user asks how an answer was reached.