holiday
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese日历与假期查询
Calendar and Holiday Lookup
概述
Overview
查询日期的完整日历信息,数据与 万年历页面 共用 。页面和 CLI 都使用服务端返回的农历、节气、节日、干支年、数九以及休息/补班状态,不在 Skill 中维护节日表或计算规则。
https://www.cyeam.com/api/calendar/dates?year=<年份>优先直接请求上述页面接口,按完整日期键取当天记录并展示。这样无需安装或更新 CLI,网页服务端的数据升级后,Skill 下次请求即会获取新版结果。示例:
bash
curl --fail --silent --show-error 'https://www.cyeam.com/api/calendar/dates?year=2027'响应是以 为键的全年对象。当天记录含 、(周一为 1)、、、、、、、、、、。展示农历、节气(含南北方小年标签)、节日、休息/补班状态,按需补充干支年和数九;空值不展示。仅凭节日名称不能推断放假,须使用返回的状态字段。未来新增字段可直接按其含义展示。
YYYY-MM-DDdateweektypenameis_holidayis_adjusted_workdaylunarlunar_daytermfestivalsgan_zhi_yearshu_jiu接口报错、404 或缺少目标日期时说明数据不可用,不切回 timor.tech 或自行猜测放假安排。404 通常表示网页新版接口尚未部署。
也可使用已迁移的本地 CLI(旧版 CLI 仍直连 timor.tech,不能保证一致):
bash
cyeam date holiday # 今天
cyeam date holiday 2026-10-01 # 指定日期
cyeam date holiday 2026-10-01 --json # 完整记录,保留未来新增字段
cyeam date holiday next-monday # 不支持,只接受 YYYY-MM-DDQuery complete calendar information for a date. The data and the Perpetual Calendar page share the same endpoint. Both the page and the CLI use the server-returned lunar date, solar terms, festivals, Gan-Zhi year, Nine Periods of Winter (Shujiu), and day-off/adjusted-workday status. The Skill does not maintain its own holiday table or calculation rules.
https://www.cyeam.com/api/calendar/dates?year=<year>Prefer requesting the page API directly, retrieving the record under the full date key, and displaying it. This avoids installing or updating the CLI, and once the web service's data is upgraded, the Skill will retrieve the updated results on its next request. Example:
bash
curl --fail --silent --show-error 'https://www.cyeam.com/api/calendar/dates?year=2027'The response is a full-year object keyed by . The record for the requested day contains , (Monday is 1), , , , , , , , , , and . Display the lunar date, solar terms (including Northern and Southern Little New Year labels), festivals, and day-off/adjusted-workday status; add the Gan-Zhi year and Nine Periods of Winter as needed. Do not display null values. A holiday cannot be inferred from a festival name alone; the returned status fields must be used. Any fields added in the future can be displayed directly according to their meanings.
YYYY-MM-DDdateweektypenameis_holidayis_adjusted_workdaylunarlunar_daytermfestivalsgan_zhi_yearshu_jiuIf the API returns an error or 404, or if the target date is missing, state that the data is unavailable. Do not fall back to timor.tech or guess the holiday schedule yourself. A 404 usually means that the new web API has not yet been deployed.
You can also use the migrated local CLI (the older CLI still connects directly to timor.tech and cannot guarantee consistency):
bash
cyeam date holiday # 今天
cyeam date holiday 2026-10-01 # 指定日期
cyeam date holiday 2026-10-01 --json # 完整记录,保留未来新增字段
cyeam date holiday next-monday # 不支持,只接受 YYYY-MM-DD安装
Installation
安装前先阅读下面的命令。示例固定为 v1.1.4,不跟随 latest;下载的是可执行程序归档。
仅在需要安装 CLI 时执行,不要在每次调用命令时重复安装。
Read the command below before installing. The example pins v1.1.4 and does not follow latest; it downloads an executable archive.
Run it only when the CLI needs to be installed; do not repeat the installation on every command invocation.
macOS / Linux:校验后安装到用户目录
macOS / Linux: Verify and install to the user directory
在 Bash 或 Zsh 中执行;需要 、、,以及 或 。
脚本自动选择 macOS / Linux 的 arm64 或 x86_64,其他平台会停止。
curltarinstallshasumsha256sumbash
(
set -eu
version='v1.1.4'
case "$(uname -s)/$(uname -m)" in
Darwin/arm64)
asset='cyeam_Darwin_arm64.tar.gz'
sha256='06b5af004ab4f0f05d5829ea6bd18b97c4449c262af7df14c67175f7d3cb29db' ;;
Darwin/x86_64)
asset='cyeam_Darwin_x86_64.tar.gz'
sha256='107342bb9d2fa444b96155c468e71b8cc63e0f5ad0acc784698afe221548efa6' ;;
Linux/aarch64|Linux/arm64)
asset='cyeam_Linux_arm64.tar.gz'
sha256='ed87697f3948bead67b585e9881c3bef20e8d2d903beb5b125587281a5091c5b' ;;
Linux/x86_64)
asset='cyeam_Linux_x86_64.tar.gz'
sha256='873d6805fab8ab56540bb034aaf2f57f12eb672fcabd322ebe401e8250a5966d' ;;
*) echo '不支持的平台,请查看固定版本的 Release。' >&2; exit 1 ;;
esac
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
cd "$workdir"
curl --fail --show-error --silent --location --proto '=https' --proto-redir '=https' \
--output "$asset" "https://github.com/mnhkahn/cyeam-cli/releases/download/$version/$asset"
printf '%s %s\n' "$sha256" "$asset" > expected.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c expected.sha256
else
shasum -a 256 -c expected.sha256
fi
# set -e 确保下载或校验失败时,不会解压或安装。
tar -xzf "$asset" cyeam
mkdir -p "$HOME/.local/bin"
install -m 0755 cyeam "$HOME/.local/bin/cyeam"
CYEAM_CLI_NO_UPDATE_NOTIFIER=1 "$HOME/.local/bin/cyeam" --no-analytics version
)只写临时目录和 (已有同名程序会被替换),无需管理员权限,
不修改系统目录、服务或 shell 配置。当前 shell 使用:
~/.local/bin/cyeambash
export PATH="$HOME/.local/bin:$PATH"如需永久生效,可自行把上面这一行加入 shell 配置。
可在 v1.1.4 发布页 和
checksums.txt
核对摘要。升级固定版本时,必须同时核对并替换版本号和对应 SHA-256。
摘要用于核对发布文件一致性,不等同于独立签名或安全审计。
Execute in Bash or Zsh; requires , , , and either or .
The script automatically selects the arm64 or x86_64 build for macOS/Linux and stops on other platforms.
curltarinstallshasumsha256sumbash
(
set -eu
version='v1.1.4'
case "$(uname -s)/$(uname -m)" in
Darwin/arm64)
asset='cyeam_Darwin_arm64.tar.gz'
sha256='06b5af004ab4f0f05d5829ea6bd18b97c4449c262af7df14c67175f7d3cb29db' ;;
Darwin/x86_64)
asset='cyeam_Darwin_x86_64.tar.gz'
sha256='107342bb9d2fa444b96155c468e71b8cc63e0f5ad0acc784698afe221548efa6' ;;
Linux/aarch64|Linux/arm64)
asset='cyeam_Linux_arm64.tar.gz'
sha256='ed87697f3948bead67b585e9881c3bef20e8d2d903beb5b125587281a5091c5b' ;;
Linux/x86_64)
asset='cyeam_Linux_x86_64.tar.gz'
sha256='873d6805fab8ab56540bb034aaf2f57f12eb672fcabd322ebe401e8250a5966d' ;;
*) echo '不支持的平台,请查看固定版本的 Release。' >&2; exit 1 ;;
esac
workdir=$(mktemp -d)
trap 'rm -rf "$workdir"' EXIT
cd "$workdir"
curl --fail --show-error --silent --location --proto '=https' --proto-redir '=https' \
--output "$asset" "https://github.com/mnhkahn/cyeam-cli/releases/download/$version/$asset"
printf '%s %s\n' "$sha256" "$asset" > expected.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c expected.sha256
else
shasum -a 256 -c expected.sha256
fi
# set -e 确保下载或校验失败时,不会解压或安装。
tar -xzf "$asset" cyeam
mkdir -p "$HOME/.local/bin"
install -m 0755 cyeam "$HOME/.local/bin/cyeam"
CYEAM_CLI_NO_UPDATE_NOTIFIER=1 "$HOME/.local/bin/cyeam" --no-analytics version
)It writes only to the temporary directory and (an existing program with the same name will be replaced), requires no administrator privileges, and does not modify system directories, services, or shell configuration. To use it in the current shell:
~/.local/bin/cyeambash
export PATH="$HOME/.local/bin:$PATH"To make it permanent, you can add the line above to your shell configuration.
You can verify the digest on the v1.1.4 release page and checksums.txt.
When upgrading to a different pinned version, you must verify and replace both the version number and its corresponding SHA-256.
The digest verifies the consistency of release files; it is not equivalent to an independent signature or security audit.
外部请求和权限用途
External Requests and Permission Purposes
- 安装下载:只从 GitHub 的固定 Release 下载选定归档;GitHub 可能重定向到其资产 CDN。
下载后先验证文档中固定的 SHA-256,再解压单个 文件。安装检查关闭统计与更新提示。
cyeam - 日历查询:向 请求全年日历, 取目标日期的完整记录;与页面共用服务端规则、假期缓存和上游降级结果。不上传本地文件,不需要登录。 网页服务端部署后,数据与日历规则的更新会同时作用于页面和 Skill;接口字段含义或命令格式变更仍需同步客户端。
https://www.cyeam.com/api/calendar/dates?year=<年份> - 使用统计:默认向 发送命令名称、CLI 版本、系统信息和随机安装编号, 服务端可根据出口 IP 解析地域;不发送命令参数、图片内容或登录凭证。 随机编号保存在
https://us.i.posthog.com,用~/.cyeam/analytics-id或--no-analytics关闭。CYEAM_CLI_NO_ANALYTICS=1 - 更新提示:默认最多每 24 小时向 GitHub 检查最新版本,并缓存到 , 提示本身不会替换程序。设置
~/.cyeam/update-state.json关闭。CYEAM_CLI_NO_UPDATE_NOTIFIER=1是显式升级命令,会下载并校验最新 Release、替换当前程序,成功后还会尝试通过cyeam update同步 skills;需要保持固定版本时不要运行它,按上述步骤安装选定版本。npx skills add
关闭 CLI 统计和更新提示(业务本身的网络请求不受影响),可在当前 shell 设置:
bash
export CYEAM_CLI_NO_ANALYTICS=1
export CYEAM_CLI_NO_UPDATE_NOTIFIER=1- Installation download: Downloads only the selected archive from the pinned Release on GitHub; GitHub may redirect to its asset CDN. After downloading, first verify the pinned SHA-256 from this document, then extract the single file. The installation check disables analytics and update notifications.
cyeam - Calendar query: Requests the full-year calendar from and retrieves the complete record for the target date; it shares the server-side rules, holiday cache, and upstream fallback results with the page. It does not upload local files and requires no login. Once deployed on the web server, updates to the data and calendar rules take effect for both the page and the Skill at the same time; changes to API field meanings or command format still need to be synchronized to the client.
https://www.cyeam.com/api/calendar/dates?year=<year> - Usage analytics: By default, sends the command name, CLI version, system information, and a random installation ID to . The server may determine the geographic region from the outbound IP; it does not send command arguments, image content, or login credentials. The random ID is stored in
https://us.i.posthog.comand can be disabled with~/.cyeam/analytics-idor--no-analytics.CYEAM_CLI_NO_ANALYTICS=1 - Update notifier: By default, checks GitHub for the latest version at most once every 24 hours and caches the result in . The notification itself does not replace the program.
~/.cyeam/update-state.jsonis an explicit upgrade command that downloads and validates the latest Release, replaces the current program, and then attempts to sync skills viacyeam update; do not run it when keeping a pinned version, and install the selected version using the steps above.npx skills add
To disable CLI analytics and update notifications (this does not affect the business request itself), set the following in the current shell:
bash
export CYEAM_CLI_NO_ANALYTICS=1
export CYEAM_CLI_NO_UPDATE_NOTIFIER=1输出
Output
日期: 2026-10-01
星期: 周四
状态: 休息日
名称: 国庆节
农历: 八月廿一
干支年: 丙午
节日: 国庆节日期: 2026-10-01
星期: 周四
状态: 休息日
名称: 国庆节
农历: 八月廿一
干支年: 丙午
节日: 国庆节状态说明
Status Descriptions
| 状态 | 含义 |
|---|---|
| 工作日 | 普通上班日 |
| 休息日 | 法定假日或周末 |
| 周末休息 | 周末 |
| 调休补班 | 调休安排的上班日(如国庆前的周末) |
| Status | Meaning |
|---|---|
| Workday | A regular working day |
| Day off | A statutory holiday or weekend |
| Weekend off | A weekend |
| Adjusted workday | A working day scheduled through compensatory time off, such as a weekend before National Day |
注意事项
Notes
- 日期格式必须为 ,支持 1900–2100 年,省略参数默认为用户所在时区的今天
YYYY-MM-DD - 不需要登录
- 未公布年度或上游异常时,服务端可能仅返回周末规则;页面与 Skill 共用该结果,不代表该年法定安排已公布。
- 页面手机版会缩短农历和“补班”标签;Skill 展示完整记录。
- 上述 v1.1.4 安装示例为历史固定版本,不含本次迁移;要使用共享日历,请直接请求页面接口,或使用包含本次改动的 CLI 构建。
- The date format must be . Years 1900–2100 are supported. If the argument is omitted, the current date in the user's time zone is used.
YYYY-MM-DD - No login is required.
- If the annual schedule has not been announced or the upstream has an error, the server may return only weekend rules. The result shared by the page and the Skill does not mean that the statutory schedule for that year has been announced.
- The mobile version of the page shortens the lunar-date and adjusted-workday labels; the Skill displays the complete record.
- The v1.1.4 installation example above is a historical pinned version and does not include this migration. To use the shared calendar, request the page API directly or use a CLI build that includes this change.