Skip to contents

Retrieves the list of official public holidays in China for a specific year using the Nager.Date public holidays API. This function returns a tibble containing the date of the holiday, the name in the local language (Chinese), and the English name. It is useful for academic, planning, and data analysis purposes. The information is retrieved directly from the Nager.Date API and reflects the current status of holidays for the requested year. The field names returned are consistent with the API structure.

Usage

get_china_holidays(year)

Source

Data obtained from the Nager.Date API: https://date.nager.at/

Arguments

year

An integer indicating the year (e.g., 2024 or 2025).

Value

A tibble with the following columns:

  • date: Date of the holiday (class Date)

  • local_name: Holiday name in the local language (Chinese)

  • name: Holiday name in English

Examples

get_china_holidays(2024)
#> # A tibble: 7 × 3
#>   date       local_name name                                 
#>   <date>     <chr>      <chr>                                
#> 1 2024-01-01 元旦       New Year's Day                       
#> 2 2024-02-10 春节       Chinese New Year (Spring Festival)   
#> 3 2024-04-05 清明节     Qingming Festival (Tomb-Sweeping Day)
#> 4 2024-05-01 劳动节     Labour Day                           
#> 5 2024-06-10 端午节     Dragon Boat Festival                 
#> 6 2024-09-17 中秋节     Mid-Autumn Festival                  
#> 7 2024-10-01 国庆节     National Day                         
get_china_holidays(2025)
#> # A tibble: 7 × 3
#>   date       local_name name                                 
#>   <date>     <chr>      <chr>                                
#> 1 2025-01-01 元旦       New Year's Day                       
#> 2 2025-01-29 春节       Chinese New Year (Spring Festival)   
#> 3 2025-04-05 清明节     Qingming Festival (Tomb-Sweeping Day)
#> 4 2025-05-01 劳动节     Labour Day                           
#> 5 2025-05-31 端午节     Dragon Boat Festival                 
#> 6 2025-10-01 国庆节     National Day                         
#> 7 2025-10-06 中秋节     Mid-Autumn Festival