Time Calc for Openclaw

A high-precision temporal toolkit that uses native shell commands to perform complex date and time calculations without external dependencies.

mrlyk
v1.0.0
Apr 9, 2026
0
517
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install time-calc

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install time-calc using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Time Calc?

Time Calc is a comprehensive utility designed for AI agents to handle temporal data with absolute accuracy. Instead of relying on error-prone LLM mental math, it leverages native shell environments (macOS, Linux, and Windows) to parse, calculate, and convert dates. This ensures that every operation—from identifying the current ISO week to calculating business day offsets—is grounded in system-level precision.

The skill is particularly effective for developers and automation workflows within Openclaw Skills that require precise scheduling, log analysis, or time zone synchronization. By abstracting platform-specific date command syntax into a unified logical framework, it provides a consistent interface for managing time across diverse operating systems.

Time Calc Use Cases

  • Resolving relative time expressions like next Wednesday or 3 days ago into absolute ISO dates.
  • Calculating the exact difference between two timestamps for duration tracking or SLA monitoring.
  • Converting local event times between different IANA or Windows time zones (e.g., Beijing to New York).
  • Performing Unix epoch timestamp conversions for debugging database entries or API responses.
  • Checking for leap years, day-of-year counts, and specific ISO week numbers.

How Time Calc Works

  1. The skill detects the host operating system (macOS, Linux, or Windows) to select the correct date command syntax.
  2. User input is mapped to one of seven atomic operations: today, info, weekday, offset, diff, convert, or epoch.
  3. The agent executes a specific shell command (using BSD date, GNU date, or PowerShell) to perform the math.
  4. For complex offsets (like month-end rollbacks), the skill applies safety logic to prevent date overflow errors.
  5. The result is returned as structured text, either to be displayed to the user or passed to a subsequent automated task.

Time Calc Setup

Time Calc utilizes native system commands and does not require external package installations. Ensure your environment has access to the standard shell.

# Verify your environment to ensure command compatibility
uname -s  # For macOS/Linux
$env:OS   # For Windows PowerShell

The skill automatically references the following internal schema based on your OS:

  • macOS: $SKILL_ROOT/references/macos.md
  • Linux/WSL: $SKILL_ROOT/references/linux.md
  • Windows: $SKILL_ROOT/references/windows.md

Time Calc Data Schema & Taxonomy

Operation Input Parameters Primary Output Example
today None 2026-04-09 Wednesday 14:30 CST
info YYYY-MM-DD Day of year, Days in month, Leap year status
weekday Modifier + Day 2026-04-17 (Next Friday)
offset Date + [+/-]Value 2026-02-28 (from Jan 31 + 1m)
diff Date1 + Date2 6 Days / 2d 9h 30m
convert Time + Zone A + Zone B Translated Time + Offset
epoch Timestamp/Date Unix Seconds or ISO Date

Time Calc Advanced Features

  • Automated platform detection (BSD vs GNU vs PowerShell) for cross-environment reliability.
  • Boundary-safe month/year arithmetic that correctly handles month-end rollbacks (e.g., Jan 31st + 1 month = Feb 28th).
  • Automatic millisecond detection for Unix timestamps (13+ digits).
  • ISO-8601 compliant week numbering and weekday logic.
  • Multi-timezone mapping supporting both IANA and Windows Time Zone IDs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*