time_diff
Calculate how long ago or until a target time from now or another base time, and label the calendar relationship as today, yesterday, tomorrow, or N days away.
Instructions
计算某个时间点距离现在(或距离另一个时间)多久,并给出"今天/昨天/前天/明天/后天/n 天前"的日历关系。用来准确描述"这件事是刚发生的还是昨天发生的"。时间按本机时区解析。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>"
},
"name": "time_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | 基准时间,省略则为现在。格式同 target | |
| target | Yes | 目标时间:2026-12-02、2026-12-02 21:40、2026年12月2日 21:40、ISO 带时区字符串或 Unix 时间戳;"now" 表示现在 |