[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

   - 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 "" 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 to scan;
once everyday the 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