GithubHelp home page GithubHelp logo

xiaoxuan6 / chinese-holidays-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 28 KB

提供**休假或者工作日查询(包含农历、星期)

Home Page: https://holidays.xiaoxuan6.us.kg

License: MIT License

Dockerfile 11.00% Go 89.00%

chinese-holidays-api's Introduction

chinese-holidays-api

提供**休假或者工作日查询

Docker

docker run --name=holidays -p 80:80 -d ghcr.io/xiaoxuan6/chinese-holidays-api/chinese-holidays-api:latest

Api

查询 2024-08-06 是否是工作日

curl http://127.0.0.1/api/holidays/2024-08-06
or
curl http://127.0.0.1/api/holidays?date=2024-08-06

{
  "code": 200,
  "date": "2024-08-05", <- version v0.0.2
  "is_holiday": false,
  "is_working_day": true,
  "lunar_date": "七月初二日", <- version v0.0.3
  "lunar_year": "甲辰年", <- version v0.0.4
  "msg": "query ok",
  "weekday": "星期一", <- version v0.0.2
  "zh_year": "龙年" <- version v0.0.4
}

返回参数:

字段 描述
code 返回状态值(200:表示成功,500:表示失败)
msg 描述
date 查询日期
lunar_date 农历日期
lunar_year 农历年份
is_holiday 是否是节假日
is_working_day 是否是工作日
weekday 星期几
zh_year 生肖年份

Features

chinese-holidays-api's People

Contributors

xiaoxuan6 avatar

Stargazers

技术云 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.