Python Forum

Full Version: How to generate calendar with 2 formats in python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, how to generate in python a calendar list between 2018 and 2022 with 2 formats:

Day of the week, Date Month Year Time (hours: minutes: seconds) - Year-Month-Date Time (hours: minutes: seconds)

Note:
Note:
Calendar: Calendar respecting leap years
Dates: Peer dates only
schedule: Randomly generated schedules

Example:

Quote:Tue, 02 Jan 2018 00:59:23 - 2018-01-02 00:59:23
Thu, 04 Jan 2018 10:24:52 - 2018-01-04 10:24:52
Sat, 06 Jan 2018 04:11:09 - 2018-01-06 04:11:09
Mon, 08 Jan 2018 16:12:40 - 2018-01-08 16:12:40
Wed, 10 Jan 2018 10:08:15 - 2018-01-10 10:08:15
Fri, 12 Jan 2018 07:10:09 - 2018-01-12 07:10:09
Sun, 14 Jan 2018 11:50:10 - 2018-01-14 11:50:10
Tue, 16 Jan 2018 02:29:22 - 2018-01-16 02:29:22
Thu, 18 Jan 2018 19:07:20 - 2018-01-18 19:07:20
Sat, 20 Jan 2018 08:50:13 - 2018-01-20 08:50:13
Mon, 22 Jan 2018 02:40:02 - 2018-01-22 02:40:02



and so on, until the year 2022 ...
what have you tried so far?
see python calendar: https://docs.python.org/3.7/library/calendar.html