The chinesecalendar module judges holidays

Chinesecalendar is a module for judging whether the date type of date is a working day or a holiday in python. First install the module pip install chinesecalendar. The usage of the imported module is as follows:

     import datetime
     from chinese_calendar import is_workday
      da  =  datetime.date(2019,1,2)
     boll = is_workday(da)
     print(boll)

  The output result is a bool value, True is a working day, and False is a rest day.

Guess you like

Origin blog.csdn.net/xxy_yang/article/details/85705652