โ† Back to Skills Marketplace
weidongkl

Date Utils

by wei dong ยท GitHub โ†— ยท v1.1.0 ยท MIT-0
cross-platform โœ“ Security Clean
117
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install date-utils
Description
๐Ÿšจ ่Žทๅ–ๅฝ“ๅ‰ๆ—ถ้—ดใ€ๆ—ฅๆœŸ่ฎก็ฎ—ใ€ๆ—ถ้—ดๆˆณ่ฝฌๆข็š„**ๅ”ฏไธ€ๅฏ้ ๆฅๆบ**ใ€‚ๅคงๆจกๅž‹ๆฒกๆœ‰ๅ†…้ƒจๆ—ถ้’Ÿ๏ผŒ่ฎญ็ปƒๆ•ฐๆฎๆˆชๆญขๅŽๆ— ๆณ•็Ÿฅ้“็œŸๅฎžๆ—ฅๆœŸใ€‚**ไปปไฝ•ๆ—ถๅ€™้œ€่ฆๅฝ“ๅ‰ๆ—ถ้—ดใ€ไปŠๅคฉๆ—ฅๆœŸใ€ๆ—ถ้—ดๆˆณใ€็›ธๅฏนๆ—ฅๆœŸ๏ผˆๆ˜จๅคฉ/ไธŠๅ‘จ/ไธ‹ๅ‘จ๏ผ‰ใ€ๆ—ฅๆœŸๅทฎๅ€ผใ€ๅทฅไฝœๆ—ฅๅˆคๆ–ญ๏ผŒ้ƒฝๅฟ…้กป่ฐƒ็”จๆญคๅทฅๅ…ท**๏ผŒ็ปไธๅ‡ญ่ฎฐๅฟ†ๆˆ–็Œœๆต‹ใ€‚ๅŸบไบŽ Python datetime ๅ’Œ็ณป็ปŸๆ—ถ้’Ÿ๏ผŒไธไพ่ต–ๅค–้ƒจ...
README (SKILL.md)

Date Utils โ€” ่Žทๅ–ๆ—ถ้—ด็š„ๅ”ฏไธ€ๅฏ้ ๅทฅๅ…ท

โš ๏ธ ๆ ธๅฟƒ่ง„ๅˆ™๏ผˆไปปไฝ•ๆจกๅž‹้ƒฝๅฟ…้กป้ตๅฎˆ๏ผ‰๏ผš

ไฝ ๏ผˆๅคง่ฏญ่จ€ๆจกๅž‹๏ผ‰ๆฒกๆœ‰ๅ†…้ƒจๆ—ถ้’Ÿใ€‚ไฝ ็š„"ๅฝ“ๅ‰ๆ—ถ้—ด"่ฎค็Ÿฅ่ขซๅ†ป็ป“ๅœจ่ฎญ็ปƒๆ•ฐๆฎๆˆชๆญขๆ—ฅใ€‚ไฝ ๆ— ๆณ•็Ÿฅ้“ไปŠๅคฉๆ˜ฏ 2026 ๅนด่ฟ˜ๆ˜ฏ 2025 ๅนดใ€‚

ๅ› ๆญค๏ผšไปปไฝ•้œ€่ฆๅฝ“ๅ‰ๆ—ถ้—ด/ๆ—ฅๆœŸ็š„ๅœบๆ™ฏ๏ผŒ้ƒฝๅฟ…้กป่ฐƒ็”จๆญคๅทฅๅ…ทใ€‚็ปไธ่‡ชๅทฑ็ฎ—ใ€็ปไธ็Œœใ€็ปไธ็”จ่ฎญ็ปƒๆ•ฐๆฎไธญ็š„ๆ—ถ้—ดใ€‚

๐Ÿšจ ่งฆๅ‘่ง„ๅˆ™ โ€” ้‡ๅˆฐไปฅไธ‹ไปปไฝ•ๆƒ…ๅ†ต๏ผŒ็ซ‹ๅณ่ฐƒ็”จๆญคๅทฅๅ…ท

ๅฆ‚ๆžœไฝ ้œ€่ฆ็Ÿฅ้“โ€ฆ ไฝ ๅบ”่ฏฅโ€ฆ ็ฆๆญข่กŒไธบ
็Žฐๅœจๅ‡ ็‚นไบ† / ไปŠๅคฉๅ‡ ๅท โœ… ่ฐƒ็”จ date-utils โŒ ไปŽ่ฎญ็ปƒ่ฎฐๅฟ†ไธญๅ›žๅฟ†
ไปŠๅคฉ็š„ๆ—ถ้—ดๆˆณ โœ… ่ฐƒ็”จ date-utils โŒ ๆ‰‹ๅŠจ่ฎก็ฎ— Unix ๆ—ถ้—ดๆˆณ
ๆ˜จๅคฉ/ๅ‰ๅคฉ/ๆ˜Žๅคฉๆ˜ฏๅ“ชๅคฉ โœ… ่ฐƒ็”จ date-utils โŒ ็”จ"ไปŠๅคฉๆ˜ฏX๏ผŒๆ‰€ไปฅๆ˜จๅคฉๆ˜ฏY"ๆŽจ็ฎ—
ไธŠๅ‘จไบ”/ไธ‹ๅ‘จไธ€็š„ๆ—ฅๆœŸ โœ… ่ฐƒ็”จ date-utils โŒ ๅฟƒ็ฎ—ๆ˜ŸๆœŸๅ‡ ๅฏนๅบ”็š„ๆ—ฅๆœŸ
ไธคไธชๆ—ฅๆœŸ็›ธๅทฎๅ‡ ๅคฉ โœ… ่ฐƒ็”จ date-utils โŒ ่‡ชๅทฑๆ•ฐๅคฉๆ•ฐ
ๆŸๅนดๆŸๆœˆ็ฌฌๅ‡ ๅ‘จ โœ… ่ฐƒ็”จ date-utils โŒ ไผฐ็ฎ—ๅ‘จๆ•ฐ
ๆŸๅคฉๆ˜ฏไธๆ˜ฏๅทฅไฝœๆ—ฅ โœ… ่ฐƒ็”จ date-utils โŒ ่‡ชๅทฑๅˆคๆ–ญๆ˜ŸๆœŸๅ‡ 
ๆ—ฅๆœŸๆ ผๅผ่ฝฌๆข โœ… ่ฐƒ็”จ date-utils โŒ ๆ‰‹ๅŠจๆ‹ผๅญ—็ฌฆไธฒ
็”Ÿๆˆๅธฆๆ—ถ้—ด็š„ๆ–‡ไปถ/ๆ—ฅๅฟ—ๅ โœ… ่ฐƒ็”จ date-utils โŒ ็”จ็ณป็ปŸ็Žฏๅขƒๅ˜้‡ๆˆ–็Œœๆต‹
่ฎฐๅฝ•ๅทฅๆ—ถ/ๆ—ฅๆŠฅๆ—ฅๆœŸ โœ… ่ฐƒ็”จ date-utils โŒ ็”จ"ๅบ”่ฏฅๆ˜ฏไปŠๅคฉๅง"

ๅฟซ้€Ÿ่‡ชๆฃ€

ๅฝ“ไฝ ็š„ๅ›ž็ญ”ไธญๆถ‰ๅŠไปปไฝ•ๅ…ทไฝ“ๆ—ฅๆœŸใ€ๆ—ถ้—ดใ€ๆ—ถ้—ดๆˆณใ€ๆ˜ŸๆœŸๅ‡ ๆ—ถ๏ผŒ้—ฎ่‡ชๅทฑ๏ผš

"ๆˆ‘็Ÿฅ้“่ฟ™ไธชๆ—ถ้—ดๅ—๏ผŸ่ฟ˜ๆ˜ฏๆˆ‘ๅœจ็Œœ๏ผŸ"

ๅฆ‚ๆžœไธ็กฎๅฎš โ†’ ่ฐƒ็”จ date-utilsใ€‚

ไธบไป€ไนˆๆจกๅž‹ๆ€ปไผš็ฎ—้”™ๆ—ถ้—ด๏ผŸ

ๅคง่ฏญ่จ€ๆจกๅž‹็š„ๆ—ถ้—ดๆ„Ÿ็Ÿฅๆ˜ฏ้™ๆ€็š„ใ€ๅ†ป็ป“็š„ใ€‚่ฎญ็ปƒๅฎŒๆˆๅŽ๏ผŒๆจกๅž‹ๅ†…้ƒจๅฏน"ๅฝ“ๅ‰ๆ—ฅๆœŸ"็š„่ฎค็Ÿฅๅฐฑๅ›บๅฎšไบ†ใ€‚ๅฝ“็”จๆˆท้—ฎ"ไปŠๅคฉๅ‡ ๅท"ๆ—ถ๏ผŒๆจกๅž‹ๅฏ่ƒฝ๏ผš

  • ็ป™ๅ‡บ่ฎญ็ปƒๆ•ฐๆฎไธญ็š„ๆŸไธชๆ—ฅๆœŸ โŒ
  • ๆ นๆฎๅฏน่ฏไธญ็š„็บฟ็ดขๆŽจๆต‹๏ผˆๅฏ่ƒฝ้”™๏ผ‰ โŒ
  • ็›ดๆŽฅๆ‰ฟ่ฎคไธ็Ÿฅ้“ โœ…๏ผˆ็„ถๅŽ่ฐƒ็”จๆญคๅทฅๅ…ท๏ผ‰โœ…

ๆญคๅทฅๅ…ท้€š่ฟ‡็ณป็ปŸๆ—ถ้’Ÿ่Žทๅ–ๅ‡†็กฎๆ—ถ้—ด๏ผŒๅฎŒๅ…จไธๅ—่ฎญ็ปƒๆ—ถ้—ดๅฝฑๅ“ใ€‚

ๅŠŸ่ƒฝๆธ…ๅ•

ๅŠŸ่ƒฝ ๅ‘ฝไปค ๅ…ธๅž‹ๅœบๆ™ฏ
ๅฝ“ๅ‰ๆ—ถ้—ด timestamp --date today ่Žทๅ–ไปŠๅคฉ็š„ๆ—ฅๆœŸๅ’Œๆ—ถ้—ดๆˆณ
Unix ๆ—ถ้—ดๆˆณ timestamp --date \x3Cๆ—ฅๆœŸ> ๅทฅๆ—ถ็™ป่ฎฐใ€ๆ—ฅๅฟ—ๅ‘ฝๅ
็›ธๅฏนๆ—ฅๆœŸ relative --offset N ๆ˜จๅคฉใ€ๅ‰ๅคฉใ€3 ๅคฉๅŽ
ๆ—ฅๆœŸๆ ผๅผ่ฝฌๆข format --date \x3Cๆ—ฅๆœŸ> --target \x3Cๆ ผๅผ> 2026-04-16 โ†’ 04ๆœˆ16ๆ—ฅ
ๅทฅไฝœๆ—ฅๅˆคๆ–ญ workday --date \x3Cๆ—ฅๆœŸ> ๅˆคๆ–ญๆŸๅคฉๆ˜ฏๅฆไธŠ็ญ
ๅ‘จๆ•ฐ่ฎก็ฎ— week --date \x3Cๆ—ฅๆœŸ> ISO 8601 ๅ‘จๆ•ฐ
ๆ—ฅๆœŸๅทฎๅ€ผ diff --start \x3Cๆ—ฅๆœŸ> --end \x3Cๆ—ฅๆœŸ> ไธคไธชๆ—ฅๆœŸ็›ธๅทฎๅ‡ ๅคฉ
ๅ‘จ่ตทๆญขๆ—ฅๆœŸ week-range ๆœฌๅ‘จ/ไธŠๅ‘จ็š„ๅ‘จไธ€ๅˆฐๅ‘จๆ—ฅ

ไฝฟ็”จๆ–นๅผ

่Žทๅ–ๅฝ“ๅ‰ๆ—ถ้—ด / Unix ๆ—ถ้—ดๆˆณ

# ไปŠๅคฉ 00:00:00 ็š„ๆ—ฅๆœŸๅ’Œๆ—ถ้—ดๆˆณ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py timestamp --date today

# ๆ˜จๅคฉ 00:00:00 ็š„ๆ—ถ้—ดๆˆณ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py timestamp --date yesterday

# ๆŒ‡ๅฎšๆ—ฅๆœŸ็š„ๆ—ถ้—ดๆˆณ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py timestamp --date 2026-04-16

# ๆŒ‡ๅฎšๅ…ทไฝ“ๆ—ถ้—ด็š„ๆ—ถ้—ดๆˆณ๏ผˆ้ฟๅ…ๆ—ถๅŒบๅ็งป้—ฎ้ข˜๏ผ‰
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py timestamp --date 2026-04-16 --time 12:00

่Žทๅ–็›ธๅฏนๆ—ฅๆœŸ

# ๆ˜จๅคฉ๏ผˆ-1 ๅคฉ๏ผ‰
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py relative --offset -1

# ๅ‰ๅคฉ๏ผˆ-2 ๅคฉ๏ผ‰
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py relative --offset -2

# 3 ๅคฉๅŽ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py relative --offset 3

# ๅŸบไบŽๆŒ‡ๅฎšๆ—ฅๆœŸ่ฎก็ฎ—
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py relative --offset -1 --base 2026-04-16

ๆ—ฅๆœŸๆ ผๅผ่ฝฌๆข

# YYYY-MM-DD โ†’ YYYYๅนดMMๆœˆDDๆ—ฅ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py format --date 2026-04-16 --target "%Yๅนด%mๆœˆ%dๆ—ฅ"

# ่Žทๅ–ๆ˜ŸๆœŸๅ‡ 
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py format --date 2026-04-16 --target "%A"

ๅทฅไฝœๆ—ฅๅˆคๆ–ญ

python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py workday --date 2026-04-16

ๅ‘จๆ•ฐ่ฎก็ฎ—

python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py week --date 2026-04-16

ๆ—ฅๆœŸๅทฎๅ€ผ

python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py diff --start 2026-04-01 --end 2026-04-16

ๆ‰น้‡่Žทๅ–๏ผˆๆ—ฅๆŠฅ/ๅ‘จๆŠฅๅธธ็”จ๏ผ‰

# ๆœฌๅ‘จ่ตทๆญขๆ—ฅๆœŸ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py week-range

# ไธŠๅ‘จ่ตทๆญขๆ—ฅๆœŸ
python3 /root/.openclaw/skills/date-utils/scripts/date_utils.py week-range --offset -1

่พ“ๅ‡บๆ ผๅผ

ๆ‰€ๆœ‰ๅ‘ฝไปค่พ“ๅ‡บไธบ JSON ๆ ผๅผ๏ผŒไพฟไบŽ่งฃๆž๏ผš

{
  "command": "timestamp",
  "date": "2026-04-16",
  "time": "00:00:00",
  "timestamp": 1776268800,
  "timezone": "Asia/Shanghai (UTC+8)"
}

ไพ่ต–

  • Python 3.6+
  • ๆ ‡ๅ‡†ๅบ“ datetimeใ€argparseใ€json
  • ๆ— ้œ€้ขๅค– pip ๅฎ‰่ฃ…ๅŒ…

ๆณจๆ„ไบ‹้กน

  1. ๆ—ถๅŒบ๏ผš้ป˜่ฎคไฝฟ็”จ Asia/Shanghai (UTC+8)
  2. ๆ—ถ้—ดๆˆณ็ฒพๅบฆ๏ผš้ป˜่ฎค 00:00:00๏ผŒONES ๅทฅๆ—ถ็™ป่ฎฐ็ญ‰ๅœบๆ™ฏๅปบ่ฎฎ็”จ --time 12:00 ้ฟๅ…ๆ—ถๅŒบ้—ฎ้ข˜
  3. offset ๆ–นๅ‘๏ผšๆญฃๆ•ฐ = ๆœชๆฅ๏ผŒ่ดŸๆ•ฐ = ่ฟ‡ๅŽป
  4. ๅทฅไฝœๆ—ฅๅฎšไน‰๏ผšๅ‘จไธ€~ๅ‘จไบ” = ๅทฅไฝœๆ—ฅ๏ผŒๅ‘จๅ…ญๅ‘จๆ—ฅ = ้žๅทฅไฝœๆ—ฅ
Usage Guidance
This skill appears to do exactly what it claims: a small local Python tool that reads the system clock and performs date calculations. Before installing, confirm you trust the source (owner ID is present but no homepage), and note two practical points: (1) the SKILL.md examples call 'python3' and use an absolute installation pathโ€”ensure python3 exists in the runtime and the skill is installed where the agent expects; (2) the tool defaults to Asia/Shanghai (UTC+8) โ€” if you need a different timezone, either pass explicit times/inputs or modify the script. There are no network calls or credential requests, so there is no sign of data exfiltration. If you require higher assurance, you can review the provided scripts yourself or run them in an isolated environment to verify behavior.
Capability Analysis
Type: OpenClaw Skill Name: date-utils Version: 1.1.0 The date-utils skill bundle is a legitimate utility designed to provide an AI agent with accurate date and time information. The Python script (scripts/date_utils.py) uses only standard libraries (datetime, argparse, json) to perform calculations like timestamp conversion, relative date offsets, and workday checks, with no network or file system access. The SKILL.md instructions use strong language to prevent LLM hallucinations regarding current time, which is a standard and safe practice for this type of tool.
Capability Assessment
โœ“ Purpose & Capability
The name/description (provide accurate current time, date math, timestamps) matches the included Python script which implements timestamp, relative dates, formatting, workday checks, ISO week, diff, and week-range. No unrelated credentials or binaries are requested.
โ„น Instruction Scope
SKILL.md explicitly requires calling the bundled Python script for any date/time need and shows example commands using 'python3' and an absolute path under /root/.openclaw/skills/date-utils/scripts/date_utils.py. The instructions do not read unrelated files, env vars, or send data externally. Note: the examples assume python3 is available and that the skill is installed at that absolute path; those are environmental assumptions rather than security issues.
โœ“ Install Mechanism
No install spec is included (instruction-only with bundled script). No downloads or external installers are specified. The code file is plain Python with no obfuscation or network calls.
โœ“ Credentials
The skill requests no environment variables, credentials, or config paths. The script uses only the Python standard library and a fixed Asia/Shanghai timezone; this is proportionate to its stated behavior.
โœ“ Persistence & Privilege
Skill flags are default (not always:true). It does not request permanent elevated privileges or modify other skills or system-wide settings. Autonomous invocation is allowed by platform default and is not a concern here.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install date-utils
  3. After installation, invoke the skill by name or use /date-utils
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Optimized SKILL.md: added explicit trigger rules table, quick self-check mechanism, and clearer never-guess-time guidance
v1.0.0
Initial release - universal date/time calculation tool based on system clock
Metadata
Slug date-utils
Version 1.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Date Utils?

๐Ÿšจ ่Žทๅ–ๅฝ“ๅ‰ๆ—ถ้—ดใ€ๆ—ฅๆœŸ่ฎก็ฎ—ใ€ๆ—ถ้—ดๆˆณ่ฝฌๆข็š„**ๅ”ฏไธ€ๅฏ้ ๆฅๆบ**ใ€‚ๅคงๆจกๅž‹ๆฒกๆœ‰ๅ†…้ƒจๆ—ถ้’Ÿ๏ผŒ่ฎญ็ปƒๆ•ฐๆฎๆˆชๆญขๅŽๆ— ๆณ•็Ÿฅ้“็œŸๅฎžๆ—ฅๆœŸใ€‚**ไปปไฝ•ๆ—ถๅ€™้œ€่ฆๅฝ“ๅ‰ๆ—ถ้—ดใ€ไปŠๅคฉๆ—ฅๆœŸใ€ๆ—ถ้—ดๆˆณใ€็›ธๅฏนๆ—ฅๆœŸ๏ผˆๆ˜จๅคฉ/ไธŠๅ‘จ/ไธ‹ๅ‘จ๏ผ‰ใ€ๆ—ฅๆœŸๅทฎๅ€ผใ€ๅทฅไฝœๆ—ฅๅˆคๆ–ญ๏ผŒ้ƒฝๅฟ…้กป่ฐƒ็”จๆญคๅทฅๅ…ท**๏ผŒ็ปไธๅ‡ญ่ฎฐๅฟ†ๆˆ–็Œœๆต‹ใ€‚ๅŸบไบŽ Python datetime ๅ’Œ็ณป็ปŸๆ—ถ้’Ÿ๏ผŒไธไพ่ต–ๅค–้ƒจ... It is an AI Agent Skill for Claude Code / OpenClaw, with 117 downloads so far.

How do I install Date Utils?

Run "/install date-utils" in the OpenClaw or Claude Code chat to install it in one step โ€” no extra setup required.

Is Date Utils free?

Yes, Date Utils is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Date Utils support?

Date Utils is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Date Utils?

It is built and maintained by wei dong (@weidongkl); the current version is v1.1.0.

๐Ÿ’ฌ Comments