Code Monkey home page Code Monkey logo

Comments (2)

LKI avatar LKI commented on June 29, 2024

is_holiday 的判定是包括普通周末的~
相当于判定,**大陆的普通人在那天会不会工作~

def is_holiday(date):
    """
    check if one date is holiday in China.
    in other words, Chinese people get rest at that day.
    :type date: datetime.date | datetime.datetime
    :rtype: bool
    """

假如要判定是因为普通周末,还是因为节假日的话,
需要用 get_holiday_detail 函数的第二个参数判定。

chinese_calendar.get_holiday_detail(datetime.date(2005, 1, 16)) 返回(True, None)

比如这个就代表05年1月16日放假是因为普通周末~

from chinese-calendar.

shirleysheng avatar shirleysheng commented on June 29, 2024

get!感谢

from chinese-calendar.

Related Issues (20)

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.