I have no clue figuring out how to check dates in workholidays

J.J. E. nkopteng at gmail.com
Fri Nov 6 02:41:18 EST 2020


Hi,

Thank you for allowing me in this support mailing list. My experience with
Python is short due to my new job. My boss told me that I need to create a
code that checks yesterday's date. The conditions for returning none are
that:

   - Yesterday happens to be a holiday,
   - Yesterday turns out to be a Saturday or a Sunday.

For both reasons, it needs to return None. Now I have learned to scan a
text file, and I have learned (ROUGHLY) the structure of what seems to scan
for specific words in "Indented Comments".

The file "gwd.py" that I have joined stands for getWorkingDate. It is the
rough draft that I am creating. So what I wish is you to help me get a
basic structure of what I need to edit and get gwd.py to scan cameroon.py;
once everyday the gwd.py checks yesterday's date and if it fills the above
conditions, it returns none. That is all.

Please note that creating a separate file with the list of national
holidays is ok but then I prefer using the holidays library because it
evolves with the years, if you know what I mean. Please forgive my lack of
proper expression as well as I have been going through Python for exactly
five weeks only.

Jean Jacques ECKEBIL


More information about the Python-list mailing list