[Open Source] A lightweight holiday-checking utility for date classification: working days, adjusted working days, public holidays, and weekends

Open SourceClassification Systems
2026-06-28 08:41 4 次浏览 • 0 次下载 0KB
[Open Source] A lightweight holiday-checking utility for date classification: working days, adjusted working days, public holidays, and weekends

1. Project Overview

Image

Spring-boot-holiday-starter v1.0.0

A lightweight utility for checking holidays!

Spring-boot-holiday-starter is a lightweight utility for checking holidays. It mainly addresses two needs: retrieving holiday data and determining whether a date is a holiday.

2. Open Source License

Licensed under Apache-2.0

3. Screenshots

Image

4. Feature Overview

Preface

Due to project requirements, the server has no network access. In some scenarios, it is necessary to determine whether a date is a holiday, so I created this utility class for convenient use.

Spring-boot-holiday-starter: A lightweight utility for checking holidays! Date classification: working days, adjusted working days, public holidays, and weekends.

5. Tech Stack

Spring-boot-holiday-starter is a lightweight utility for checking holidays. It mainly addresses two needs: retrieving holiday data and determining whether a date is a holiday.

  • Usage Instructions

  • spirngboot 2.7 +

  • jdk17 +

Usage

  • YML Configuration

holiday:
  ## Holiday data source configuration: network mode retrieves data online through the Baidu Calendar API; local mode retrieves data from a local JSON file.
  type: network
  ## In online mode, set years to initialize the calendar data cache.
  years:
    - 2020
    - 2021
  ## Holiday data source path: the system path is checked first; if it does not exist, the resources path is used.
  path: /config/holiday.json
  • HolidayService Interface (for retrieving calendar data and checking holidays / working days / adjusted working days / weekends)

    • getDate method: Retrieves calendar data

    • isHoliday method: Checks whether a date is a public holiday

    • isWorkDay method: Checks whether a date is a working day or an adjusted working day

    • isWeekend method: Checks whether a date falls on a weekend

  • HolidayFixService Interface (for repairing calendar data and updating JSON files in local mode)

    • reset method: Resets the data and refreshes it

    • fix method: Repairs cached data

    • updateFile method: Updates JSON file data

Note: JSON files can be generated using GenerateHolidayTest. See HolidayTest for examples.

Roadmap

springboot

  • Automatically parses official "Holiday Arrangement Notices" and provides multiple online parsing methods

  • Supports Redis

  • Supports MySQL

  • Supports MinIO

  • Supports MongoDB

solon

  • Supports Solon

#1
资源直链https://gitee.com/bzvs_team/spring-boot-holiday-starter
去下载
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare