Changes

Jump to: navigation, search

OPS445 Online Assignment 1

311 bytes removed, 21:18, 29 September 2021
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 today() function will be called if the user has not specified a second argument. It will return '''your Linux computer's local time''' in the format DD-MM-YYYY. Hint: you may need to read man pages for a shell command in order to return a usable date. You may also use string formatting to modify output.
* 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.

Navigation menu