In order to write a script calculating the current stand of a bank account, I would need to write a function finding the income and outcome events between the initiated date and the current date.
Using datetime in Python it is possible to find the number of days that have passed between two dates with datetime.timedelta, however for any transaction that occurs monthly or yearly, I would need something to find also the number of months and years between, taking into account the different lengths of them.
Is there a way of finding the number of "events" (i.e. specific dates) between to input dates using datetime in Python?
For example: Transaction t1 occurs every day 2 of each month. Transaction t2 occur every 14 days starting on January first. Given two input dates July 03 and August 29, the function finds how many time t1 and t2 have happened (and uses this to compute the final value)