Calendar and Holiday Lookup
Overview
Query complete calendar information for a date. The data and the
Perpetual Calendar page share the same
https://www.cyeam.com/api/calendar/dates?year=<year>
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.
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.
If 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
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: Verify and install to the user directory
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.
bash
(
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:
bash
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
- 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.
- Calendar query: Requests the full-year calendar from
https://www.cyeam.com/api/calendar/dates?year=<year>
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.
- 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 and can be disabled with or .
- Update notifier: By default, checks GitHub for the latest version at most once every 24 hours and caches the result in
~/.cyeam/update-state.json
. The notification itself does not replace the program. is an explicit upgrade command that downloads and validates the latest Release, replaces the current program, and then attempts to sync skills via ; do not run it when keeping a pinned version, and install the selected version using the steps above.
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
星期: 周四
状态: 休息日
名称: 国庆节
农历: 八月廿一
干支年: 丙午
节日: 国庆节
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
- 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.
- 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.