democritus-project / d8s-dates

Democritus functions for working with dates and times.
GNU Lesser General Public License v3.0
0 stars 2 forks source link

Write function to calculate half-birthday #21

Open fhightower opened 3 years ago

fhightower commented 3 years ago

HELP WANTED 👋 : If you'd like to take this challenge on, please let me know! Even if you're new to Python and/or github, this is a great place to start and I'd be happy to help walk you through this challenge as much as you need - don't hesitate to ask.

This particular issue will give you some exposure to writing a relatively simple function, working with dates in Python, and writing some tests.


What?

I would like a function to calculate a half birthday. It should be implemented based on the more precise method described in Wikipedia:

The more precise method is to add or subtract half the number of days in a year to the birth date. In the case of a common year, this would be 182.5 days. In leap years, the number of days would be 183. This method would lead to a March 1 or February 29 half-birthday for an August 31st birthday, depending on whether it's a leap year.

A couple other thoughts:

Why?

This is a fun function to have 😄

How?

I can give some implementation guidance if needed. Otherwise, you got this!