Coder Social home page Coder Social logo

iposho / holidays-calendar-ru Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 111 KB

Производственный календарь РФ

Home Page: https://calendar.kuzyak.in

License: MIT License

JavaScript 1.25% TypeScript 91.74% SCSS 7.00%
calendar holiday-calculation json-calendar work-calendar production-calendar russian-holidays

holidays-calendar-ru's Introduction

Uptimerobot Vercel GitHub Size Last Commit MIT LICENSE

Производственный календарь

API предоставляет производственные календари в формате JSON, актуальные для Российской Федерации. Доступные годы: с 2023 по 2024.

Ссылка на репозиторий: GitHub - holidays-calendar-ru

Содержание

API Эндпоинты

Получить все доступные календари

GET /api/calendar

curl -H "Content-Type:application/json" -X GET "https://calendar.kuzyak.in/api/calendar"

Ответ

{
  "years": [
    2023,
    2024
  ],
  "status": 200
}

Получить календарь на конкретный год

GET /api/calendar/:year

curl -H "Content-Type:application/json" -X GET "https://calendar.kuzyak.in/api/calendar/2023"

Ответ

{
  "year": 2023,
  "months": [
    {
      "id": 0,
      "name": "January",
      "workingDays": 17,
      "notWorkingDays": 14,
      "shortDays": 0,
      "workingHours": 136
    }
    // ... Другие месяцы
  ],
  "status": 200
}

Получить праздничные и сокращенные дни на конкретный год

GET /api/calendar/:year/holidays

curl -H "Content-Type:application/json" -X GET "https://calendar.kuzyak.in/api/calendar/2023/holidays"

Ответ

{
  "year": 2023,
  "holidays": [
    {
      "date": "2023-01-01T00:00:00.000Z",
      "name": "Новый год"
    }
    // ... Другие праздники
  ],
  "shortDays": [
    {
      "date": "2023-02-22T00:00:00.000Z",
      "name": "День защитника Отечества"
    }
    // ... Другие сокращенные дни
  ],
  "status": 200
}

Получить календарь на конкретный месяц

GET /api/calendar/:year/:month

curl -H "Content-Type:application/json" -X GET "https://calendar.kuzyak.in/api/calendar/2023/1"

Ответ

{
  "year": 2023,
  "month": {
    "id": 0,
    "name": "January",
    "workingDays": 17,
    "notWorkingDays": 14,
    "shortDays": 0,
    "workingHours": 136
  },
  "status": 200
}

Получить информацию о конкретном дне

GET /api/calendar/:year/:month/:day

curl -H "Content-Type:application/json" -X GET "https://calendar.kuzyak.in/api/calendar/2023/2/22"

Ответ

{
  "year": 2023,
  "month": {
    "name": "February",
    "id": 1
  },
  "date": "2023-02-22T00:00:00.000Z",
  "isWorkingDay": true,
  "isShortday": true,
  "holiday": "День защитника Отечества",
  "status": 200
}

Локальная установка

git clone https://github.com/iposho/holidays-calendar-ru.git
cd holidays-calendar-ru/
npm i
[...]
npm run dev

Как внести свой вклад

  1. Форкните этот репозиторий.
  2. Создайте ветку своей фичи (git checkout -b my-new-feature).
  3. Закоммитьте изменения (git commit -am 'Add some feature').
  4. Запушьте изменения в репозиторий (git push origin my-new-feature).
  5. Создайте новый пулл-реквест в ветку develop.

Лицензия

Это проект с открытым кодом, распространяющийся под лицензией MIT License.

holidays-calendar-ru's People

Contributors

iposho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.