How do I calculate the date six months from the current date using the datetime Python module?
I found this solution to be good. (This uses the python-dateutil extension) from datetime import date from dateutil.relativedelta import relativedelta six_months = date.today() + relativedelta(months=+6) The advantage of this approach is that it takes care of issues with 28, 30, 31 days etc. This becomes very useful in handling business rules and scenarios (say invoice … Read more