(Oct-12-2023, 11:01 AM)jacksfrustration Wrote: i want to make a list of days and dates for the current month
(Oct-12-2023, 02:37 PM)jacksfrustration Wrote: Is there a way to ... display the past 5 and upcoming 5 daysthese are fairly different requiremets
You can easily generate dates between t-5 and t=5
from datetime import date, timedelta def dates(offset=5): tday = date.today() for delta in range(-offset, offset+1): yield (tday + timedelta(days=delta)).strftime('%a %d %B %Y') print(list(dates()))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs