Monday, February 1, 2021

"Morphex's Blogologue": 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.

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...