A small script to find suitable, recurring dates
So, I recently was in a long process, to find an arrangement between me and the kids mom regarding the kids.We made a court settlement, and the setup is that I see them every 8th week. Through my volunteer work, I have commitments during Christmas and Easter, and I also plan to partake in a mini triathlon in the middle of July each year. A useful goal, to keep me motivated for exercise. I also meet family around this triathlon, and it's good to keep connected, and get connected.
I've come quite a long way physically, I feel much lighter and nimbler today than I did a year ago, five years ago.
So, I created this small script:
https://github.com/morphex/misc/blob/master/togetherness.py
Using the Python 3 datetime module. I haven't used the formatting before, so I'm not sure if I did it right, but it looks right on the console anyway.
I thought about adding checks for whether dates were around Christmas or Easter, but it didn't look like the datetime module could automatically figure out what period Easter falls on each year.
And having run the script, I found a usable start date just checking Easter dates manually.
[Updated 03/02/2021 10:30] Mark Lawrence chimes in on email, mentioning the dateutil module:
https://dateutil.readthedocs.io/en/stable/
When I think about it, the Python library documentation could do with a section at the end of each module, which briefly summarizes known, trusted modules and packages and their contents.
It's not directly under PSF control, but it would be useful to have nonetheless.
[Permalink] [By morphex] [Python and web (Atom feed)] [01 Feb 19:36 Europe/Oslo]