Token导航 LogoToken导航TokenDH.com
研究检索执行命令clawhub未标认证来源可访问clear审计通过

global-holidays全球假期

Agent Skill

global-holidays 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

24,014

周安装

1,021

GitHub Stars

公开资料未说明

下载量

8,413
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:global-holidays(全球假期)
来源仓库:https://github.com/yting27/global-holidays
安装命令:
openclaw skills install global-holidays
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install global-holidays

简介

查询全球各国及地区的公共假期信息,支持多时区与本地化数据。

  • 适用于行程安排、业务排期与客户沟通管理场景。
  • 通过 clawhub 安装,需确认日历数据接口与更新频率。
  • 提供结构化假期列表与年份范围查询功能。global-holidays 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 建议在使用前验证目标国家/地区的法律与文化准确性。

SKILL.md

name
global-holidays
description
|
metadata
{"clawdbot":{"emoji":"🗓️","requires":{"bins":["python","pip"]}, "install":[{"id":"pip","kind":"pip","package":"holidays","label":"Install holidays package"}]}}

holidays — Python Holiday Library

Overview

holidays is a Python library that generates country- and subdivision-specific sets of government-designated holidays on the fly. It covers 249 countries (ISO 3166-1) and supports subdivisions (states, provinces, regions) via ISO 3166-2 codes.

The central object is HolidayBase, which behaves like a Python dict mapping date → holiday name. All examples below can be run directly in the shell:

python <<'EOF'
# your code here
EOF
# OR (if the package is installed via uv)
uv run - <<EOF
# your code here
EOF

Installation

IMPORTANT: Always use a virtual environment or --break-system-packages flag.

pip install holidays --break-system-packages

For production use, pin to a specific version:

pip install holidays==0.58 --break-system-packages

Quick Reference

TaskMethod
All holidays for a country/yearcountry_holidays('US', years=2024)
Holidays for a subdivisioncountry_holidays('US', subdiv='CA', years=2024)
Holidays in a date rangeholidays_obj['2024-01-01':'2024-01-31']
Check if a date is a holidayholidays_obj.get('2024-12-25') → name or None
Add custom holidaysholidays_obj.update({'2024-07-10': 'My Birthday!'})
List all supported countrieslist_supported_countries()
List countries with localizationlist_localized_countries()

Core API

country_holidays() — Main Function

country_holidays(
    country,          # ISO 3166-1 alpha-2 code, e.g. 'US', 'GB', 'DE'
    subdiv=None,      # ISO 3166-2 subdivision code, e.g. 'CA', 'TX', 'BY'
    years=None,       # int or list of ints, e.g. 2024 or [2023, 2024]
    expand=True,      # auto-expand years when checking dates outside current range
    observed=True,    # include observed holidays (e.g. holiday on weekend → Monday)
    language=None,    # ISO 639-1 language code for holiday names, e.g. 'en', 'de'
    categories=None,  # filter to specific holiday categories (country-dependent)
)

Returns a HolidayBase object (dict-like: {date: name}).


Common Tasks

1. Get All Holidays for a Country in a Year

from holidays import country_holidays

us_holidays = country_holidays('US', years=2024)
for date, name in sorted(us_holidays.items()):
    print(date, name)

2. Get Holidays for a Subdivision (State / Province)

Use the ISO 3166-2 subdivision code (e.g. 'CA' for California, 'BY' for Bavaria).

from holidays import country_holidays

ca_holidays = country_holidays('US', subdiv='CA', years=2024)
for date, name in sorted(ca_holidays.items()):
    print(date, name)

3. Get Holidays Within a Date Range

Slice the HolidayBase object with date strings ('YYYY-MM-DD'):

from holidays import country_holidays

ca_holidays = country_holidays('US', subdiv='CA', years=2024)
for day in ca_holidays['2024-01-01':'2024-01-31']:
    print(f"{day}: {ca_holidays.get(day)}")

4. Check if a Specific Date is a Holiday

.get() returns the holiday name if the date is a holiday, or None if it is not.

from holidays import country_holidays

ca_holidays = country_holidays('US', subdiv='CA')

# Is December 25 a holiday?
name = ca_holidays.get('2024-12-25')
print(name)   # → 'Christmas Day'

# Is December 26 a holiday?
name = ca_holidays.get('2024-12-26')
print(name)   # → None

Tip: Use if date in holidays_obj: for a boolean check (faster than .get()).

5. Working with Custom Holidays

SECURITY NOTE: Only use custom holidays if the user explicitly provides or requests them. Never assume a file location exists.

ALWAYS ask the user for the file path rather than using a default location. If they don't have a custom holidays file, skip this feature.

Example workflow:

  1. Ask user: "Do you have a custom holidays JSON file you'd like to include?"
  2. If yes, ask: "What's the full path to your custom holidays file?"
  3. Only then load and merge:
import json
from pathlib import Path
from holidays import country_holidays

# ONLY use this if user explicitly provided the path
custom_file = Path("/path/user/provided/custom-holidays.json")

# Verify file exists before reading
if custom_file.exists():
    with open(custom_file) as f:
        custom_data = json.load(f)

    holidays_2024 = country_holidays('US', years=2024)
    holidays_2024.update(custom_data)

    print(holidays_2024.get('2024-07-10'))  # → 'My Birthday!' (if defined)
else:
    print(f"File not found: {custom_file}")

Custom holidays file format:

{
  "2024-07-10": "My Birthday!",
  "2024-10-01": "Family Celebration"
}

6. List All Supported Countries and Subdivisions

from holidays import list_supported_countries

# include_aliases=True also returns common aliases (e.g. 'UK' for 'GB')
supported = list_supported_countries(include_aliases=True)
print(supported['US'])   # → list of supported US subdivision codes

7. Use Localized (Translated) Holiday Names

Language codes:

  • Use ISO 639-1 codes (e.g., en, de, fr)
  • Some countries use locale-specific codes (e.g., en_US, zh_CN)
  • If an unsupported language is requested, the library falls back to the default language

Step 1: Find countries with localization support

from holidays import list_localized_countries

# Get all countries that support multiple languages
localized = list_localized_countries(include_aliases=True)

# Check if a specific country supports localization
if 'MY' in localized:
    print(f"Malaysia supports: {localized['MY']}")
    # Output: Malaysia supports: ['en_MY', 'ms_MY', 'zh_CN', ...]

Step 2: Generate holidays in a specific language

from holidays import country_holidays

# Malaysia holidays in Malay language
my_holidays_ms = country_holidays('MY', years=2025, language='ms_MY')
for date, name in sorted(my_holidays_ms.items())[:3]:
    print(f"{date}: {name}")

# Same holidays in English
my_holidays_en = country_holidays('MY', years=2025, language='en_MY')
for date, name in sorted(my_holidays_en.items())[:3]:
    print(f"{date}: {name}")

Key Behaviours to Know

  • observed=True (default): When a holiday falls on a weekend, the observed date (typically Monday) is included. Set observed=False to get only the statutory date.
  • expand=True (default): If you check a date outside the years range, the library automatically adds that year. Set expand=False to prevent this.
  • Multiple years: Pass a list to years to load several years at once: years=[2023, 2024, 2025].
  • Date keys: The HolidayBase dict accepts datetime.date, datetime.datetime, or 'YYYY-MM-DD' strings interchangeably as keys.
  • Country codes: Use ISO 3166-1 alpha-2 (e.g. 'US', 'GB', 'DE'). Aliases like 'UK' are supported when include_aliases=True.

Dependencies

  • Python: 3.10+
  • Package: holidays (PyPI). Install with: pip install holidays --break-system-packages
  • No external system dependencies required

Security Considerations

  1. Package installation: Use --break-system-packages flag (required in this environment) and consider pinning to a specific version
  2. Custom holidays files: Only load custom holidays when explicitly requested by the user with a user-provided path
  3. File access: Verify file existence before reading to avoid exposing directory structure

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

88.07%
按下载量换算7,409

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

执行命令

安装流程涉及命令执行,可能通过 openclaw skills install global-holidays 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills