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:
The function should be wrapped with the @date_parse_first_argument decorator so that it can take a datetime object or a string in a parsable date format
The function should return a datetime.date or datetime.datetime object (I'll leave it up to you, but am happy to give some input if needed)
Why?
This is a fun function to have 😄
How?
I can give some implementation guidance if needed. Otherwise, you got this!
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:
A couple other thoughts:
@date_parse_first_argument
decorator so that it can take a datetime object or a string in a parsable date formatdatetime.date
ordatetime.datetime
object (I'll leave it up to you, but am happy to give some input if needed)Why?
This is a fun function to have 😄
How?
I can give some implementation guidance if needed. Otherwise, you got this!