Datetime
ProductivitydatetimeDatetime is an Agent Skill for productivity published in the microclaw/microclaw repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Do date and time math: differences between dates, 'days until' a deadline, add/subtract durations, weekday of a date, and timezone conversions. Use when users ask how many days until X, what day of the week a date is, convert a time between zones, or compute an age/duration. Triggers on mentions of days until, how long until, what day is, weekday, timezone, time difference, countdown, 还有几天, 倒计时, 星期几, 时区, 时间差, 几点.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/microclaw/microclaw/blob/HEAD/skills/built-in/datetime/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/datetime, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Date & Time
Compute dates with code — humans miscount days, leap years, and DST. Prefer the bot's
get_current_time / compare_time tools for "now" and deltas; use this for richer math.
Difference between two dates
python3 -c "from datetime import date; print((date(2026,12,31)-date(2026,5,31)).days, 'days')"
Days until a deadline (from today)
python3 -c "from datetime import date; d=date(2026,9,1); print((d-date.today()).days, 'days to go')"
Weekday of a date
python3 -c "from datetime import date; print(date(2026,5,31).strftime('%A'))"
Add / subtract a duration
python3 -c "from datetime import date,timedelta; print(date.today()+timedelta(days=90))"
Timezone conversion
python3 -c "
from datetime import datetime
from zoneinfo import ZoneInfo
t = datetime(2026,5,31,9,0,tzinfo=ZoneInfo('America/New_York'))
print(t.astimezone(ZoneInfo('Asia/Shanghai')))
"
Guidance
- Use IANA zone names (
Asia/Shanghai,Europe/London), not raw offsets — they handle DST. - State the timezone in your answer when it matters; ambiguity here causes real mistakes.
- For business-day counts (excluding weekends/holidays), say so and compute explicitly.