Python dealing with dates and times
- by randombits
I'm looking for a solution to the following:
Given today's date, figure out what month was before. So 2 should return for today, since it is currently March, the third month of the year. 12 should return for January.
Then based on that, I need to be able to iterate through a directory and find all files that were created that month.
Bonus points would include finding the most current file created for the previous month.