I'm trying to go back December month but my results are month 0 instead of month 12... how can I do that? I create a code and on it I need the Today date and also the last day of the before month, I mean: for example today is 25/01/2018 and I need 31/12/2017. On February I'm going to run it again and I need for example 25/02/2018 and 31/01/2018. That is the relationship I'm looking for
import datetime
fecha17 = time.strftime(str((int(time.strftime("%d")))-1) +"/" + str((int(time.strftime("%m")))-1) + "/%Y")