384
edits
Changes
→Script structure and sample template
* The dbda() function should be the main function of your script. The dbda() function will take a date in "YYYY-MM-DD" format, a positive or negative integer, and return a date either before or after the given date according to the value of the given integer in the same format. Your dbda() function should delegate the actual calculation of the target date to either the after() function or the before() function.
* The before() function will take a date in "YYYY-MM-DD" format and return the date of the previous day in the same format.
* The after() function will take a date in "YYYY-MM-DD" format and return the date of the next day in the same format. Next paragraph is a sample python code for the after() function. To earn the maximum possible mark for the assignment, you should modify the sample after() function to make use of the days_in_mon() function.